streaming .wav music player
Posted: Fri Mar 03, 2023 4:13 pm
This program can play normal .wav sampled music files. Not only that, but it streams them from disk rather than loading it all in memory, so that there is virtually no limit on how long you want the music to play!
Personally I'm using sox and adpcm-xq to convert music to .wav, but you can create these with almost all audio tools.
Supported:
- 8 and 16 bit sample widths
- mono or stereo
- uncompressed or ima-adpcm compression with 256 bytes block size (mono only for now)
- up to 48828 Hz sample rate
In practice the sample rate is limited by the streaming speed from disk. (and adpcm decompression if applicable)
I've successfully played the following in the emulator :
- stereo 16 bit uncompressed at 16 kHz
- mono 16 bit adpcm at 17 kHz
- mono 8 bit uncompressed at 44.1 kHz
Mostly written in Prog8. Source code is here.
Personally I'm using sox and adpcm-xq to convert music to .wav, but you can create these with almost all audio tools.
Supported:
- 8 and 16 bit sample widths
- mono or stereo
- uncompressed or ima-adpcm compression with 256 bytes block size (mono only for now)
- up to 48828 Hz sample rate
In practice the sample rate is limited by the streaming speed from disk. (and adpcm decompression if applicable)
I've successfully played the following in the emulator :
- stereo 16 bit uncompressed at 16 kHz
- mono 16 bit adpcm at 17 kHz
- mono 8 bit uncompressed at 44.1 kHz
Mostly written in Prog8. Source code is here.