igorski / MWEngine

Audio engine and DSP library for Android, written in C++ providing low latency performance within a musical context, while providing a Java/Kotlin API. Supports both OpenSL and AAudio.
MIT License
261 stars 45 forks source link

Add support for non-16 bit WAV assets #78

Closed igorski closed 5 years ago

igorski commented 5 years ago

Loading .WAV files from the APK's packaged assets currently only supports 16-bit WAV files, support should be extended for any bit rate.

teotigraphix commented 5 years ago

Are you looking to write your own wav parsing code? Or OS code/library and then implement?

igorski commented 5 years ago

WAVs are parsed by the engine already (apart from the header its all raw PCM values that can easily be processed), there is an oversight where the block size is assumed at 16-bits instead of deriving this from the bit rate defined in the header (which ironically, is read).

igorski commented 5 years ago

Addressed in https://github.com/igorski/MWEngine/pull/96