Started by Artanejp, November 20, 2019, 09:33:07 AM
0 Members and 1 Guest are viewing this topic.
Quote from: Ters on November 20, 2019, 11:23:09 PMIf this is true, what has the developers of SDL_mixer been thinking? Even if the proper way to use SDL_mixer might be to use it from a background thread, and thereby not freezing the game completely, having huge pauses between songs, as well as sudden spikes in CPU usage, isn't good. Maybe one could preload them all, but that adds loading time and lots of memory to store the rendered, uncompressed music, or even more loading time to compress it. Even then, it makes no sense that it is better at using an external timidity than the bundled one.
Quote from: DrSuperGood on November 22, 2019, 12:27:21 AMI think you are overestimating the complexity of sound. A 10 minute stereo midi track at 48 KHz sampling and 16 bits per sample requires a total of 115,200,000 bytes or roughly 115 MB. In reality the midi might be mono, the sampling rate or depth would be limited by the instrument samples used and music is usually significantly shorter than 10 minutes.
Quote from: DrSuperGood on November 22, 2019, 12:27:21 AMa 12 core Ryzen 3900X using Java and memory mapped IO to decompress
Quote from: DrSuperGood on November 22, 2019, 12:27:21 AMA well optimized C/C++ midi converter running on a single thread should be able to convert such 10 minute file in around 1 second, unless some very complicated, usually non-standard, instrument logic is used.