Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small file improvements #48

Merged
merged 11 commits into from
Aug 8, 2024
Merged

Small file improvements #48

merged 11 commits into from
Aug 8, 2024

Conversation

braheezy
Copy link
Owner

While working with small (less than 1s) and mono channel WAV files, I noticed several bugs in how the player handles this.

Of note:

  • Files with a bit depth lower than 16 don't encode well to QOA format. The WAV decoding logic produces no audio when stuffed into QOA bits. I tried something where I scaled the 8bit number to the 16bit range, and while this did produce audio, it was high-pitched and incorrect.
  • The oto audio player only allows one audio context to be created and it cannot be changed after the fact. At context creation time, the channel number is set. 2 is a good default, but mono files will be played twice as fast. So I made updates to the QOA library Reader to duplicate mono data into stereo channels and this seems to work, the audio sounds good.

@braheezy braheezy merged commit 36c0bc2 into main Aug 8, 2024
4 checks passed
@braheezy braheezy deleted the small-file-improvements branch August 8, 2024 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant