jkotlinski / lsdpack

Standalone LSDj recorder+player
GNU General Public License v2.0
116 stars 18 forks source link

Compression #1

Closed jkotlinski closed 6 years ago

jkotlinski commented 6 years ago

Compress the music stream (LZ77? Huffman?)

Huffman saves ~150 kbyte on Tachyon Beam

Eiyeron commented 6 years ago

I wonder what would be the additional CPU cost such compression would add. I haven't done benchs, but I suspect the usage to be quite varying due to how sample playback can be taxing on the CPU, right?

jkotlinski commented 6 years ago

Right, adding compression definitely costs CPU cycles, so it is a trade off. Maybe any work on this should be postponed until it is more clear if and how people will actually use this.

Eiyeron commented 6 years ago

Well, I saw people wanting to make players with custom graphics and animations, akin to jukeboxes. Some are planning audio registers-based vizs so I guess unless they go wild during the interrupts, they might be okay with the routine running.

That being said, I haven't seen how the other available drivers work, so I won't be able to properly compare and tell if lsdj would be fit for being a game-wise audio driver if you go easy on the CPU (no vibrato, samples, etc...).

Also it'd be interesting to project a hypothetical CPU/interrupt usage in the song (I guess min/max/avg/peaks?), if that's possible.

Anyway thanks for making a player, people already are making good use for it, like making "official" benchmark material.

jkotlinski commented 6 years ago

I added a simple visualization of CPU cost now. It does not look like there are too much free cycles to spend on better compression.