FreddyV wrote:I use 4 buffers of 1/50 of seconds. It is a simple trick used a lot....
I'm sorry, but I still don't understand. How is mixing into 4 buffers faster than mixing into a single output buffer? Are the 4 buffers also output buffers, or do they need to be mixed together later? If mixed together later, then that's not faster than GLX, because there's additional overhead involved in setting up the second mixing pass, reading from memory again, etc. Sorry if I'm misunderstanding.
Then if it is still too slow, It do not mix the last channels and channels with a small volume during the next buffer.
At the end slow volume Channels are in pause during 1/50 of sec.
We do not hear the difference.
I'm not sure I understand this either, but eliminating calcs is definitely the way to go if you want to beat GLX.
GLX doesn't use volume tables IIRC. Meaning, for a 4-channel MOD, it always mixes 4 channels with fixed adjustment even if none of them are playing. This is the fastest mixing, but might be doing work it doesn't need to.
For a routine that uses volume tables, you can mix 2, 3, or 4 channels -- BUT there is overhead in translating the correct volume table for every sample.
So it's a trade-off as to which method is better. I think for 4 or less channels, GLX is faster because most of the time all 4 channels will be playing something. For 8, 12, 16-channel tunes, volume tables and partial mixing is better, because 1. Most of the time, not all channels will be playing something, and 2. You need volume tables to scale that many mixed channels into a reasonable-sounding 8-bit end result anyway.
A 16-bit mixing path to support 16-bit output might be faster than 8-bit if the instrument samples are pre-converted into 16-bit such that no shifting/tables are needed, and the end result won't overflow. However this is just a theory 😀 I haven't tested it, and not many people put 16-bit soundcards into 808x systems 😉