Hmmm, after reading your request I thought "Yeah, that would be cool". But then a few seconds more thinking and ... "How the heck would I do that?" Does anyone have any suggestions as a starting point?
Hi
The solution exists. I'll take it nicely from the beginning and first lightly:
You must not use _SNDPLAY but _SNDRAW and a numeric data field (which is the actual WAV file data). Therefore, it is good to first convert OGG files to WAV format, you load them into one huge array, it will basically be a buffer temporary memory) and then you have to introduce one auxiliary array that will determine from which record to which record in the buffer field the data for one WAV sound.
example:
(1.WAV is array index 0 to 55632, 2.WAV is array index 55633 to 99596...)
After pressing the key, the required RAW audio data is read from the large buffer field. Let's say you press the "S" key and it will play a 2.wav file (2.ogg in your case) Before this is played, the audio data of this file must be written in another field, say "output sound". If another button is pressed at that time, the field must be analyzed as "output sound" and samples in that field that have not been played must be averaged along with the new samples.
What I mean. Suppose it plays a 2 second sound. At 0.5 seconds from the start of sound playback, you press another button for another sound in lenght 5 seconds. The program must mix 1.5 seconds of the original sound with the new sound and add new samples from the new 3.5 second sample at the same time. This creates a huge array of samples, which can then be easily played with the _SNDRAW statement and saved using my program.
Now i start to write small example.