New demo uploaded: PCM Multi-Encoding Demo

All aspects of programming on the Commander X16.
Post Reply
SlithyMatt
Posts: 913
Joined: Tue Apr 28, 2020 2:45 am

New demo uploaded: PCM Multi-Encoding Demo

Post by SlithyMatt »




PCM Multi-Encoding Demo




View File






This is a demo of 26 different encodings for PCM audio playback, from the maximum bitrate (48.828 kHz, 16-bit stereo) the minimum (381 Hz, 8-bit mono) using the same non-copyright music track and fitting as much data as possible into 63 RAM banks (504 kB).

Just press different letters to hear different samples.

As seen on YouTube:





 






 
User avatar
kliepatsch
Posts: 247
Joined: Thu Oct 08, 2020 9:54 pm

New demo uploaded: PCM Multi-Encoding Demo

Post by kliepatsch »


Thanks! I think this is a nice resource for when people want to find the PCM settings that suit their needs best.

kelli217
Posts: 546
Joined: Sun Jul 05, 2020 11:27 pm

New demo uploaded: PCM Multi-Encoding Demo

Post by kelli217 »


I wonder if it would be possible to do some sort of double-buffering. Use only two banks, and play from one while loading new data to the other from storage. Theoretically this would allow arbitrary length PCM sounds.

SlithyMatt
Posts: 913
Joined: Tue Apr 28, 2020 2:45 am

New demo uploaded: PCM Multi-Encoding Demo

Post by SlithyMatt »


You can already do arbitrary length. The sound stops playing once the FIFO is depleted. This demo was to show how long a sound could be in memory, but you could certainly feed the FIFO from a file, if the bit rate isn't too fast. It definitely takes longer than 2 seconds to load 500k from the SD card, so the bit rate would need to be well under maximum to allow "streaming". You might be able to get away with 12kHz.

Post Reply