I would like to suggest a looping audio feature in the audio part of
the library of both libsdl and sdl_sound.
I don’t see what libSDL has to do with it… It doesn’t understand audio
files in any way, beyond the point of being able to load a WAV file into
a raw memory buffer.
One might argue that it would be nice if SDL could give you some more
info about the loaded wave, but then again, I think SDL_LoadWAV() should
simply be seen as a conveniency function. Use a dedicated audio file lib,
such as SDL_sound for loading your data if you need more than the very
basics.
Often, a music piece will
consist of two parts, an intro plus a part which is endlessly
repeated.
Or you could think of it as the “end-of-file action” being a jump to a
specific position, rather than stopping playback, or restarting from the
beginning. Just one part and a loop marker.
It would be great if both the .WAV and MIDI file types
could be looped such that the intro part plays, then the main part
which is looped endlessly.
AFAIK, there’s no standard way of storing loop markers in MIDI files. At
least, I haven’t found any traces of them when saving MIDI type 0 or 1
from Cakewalk. (I hope I’m missing something…)
(As to the songs in Kobo Deluxe, they simply have special text markers
that function as commands to the custom MIDI player. I can assure you
those files won’t play correctly in any sense of the word on anything
but that engine. 
The SDL_PauseAudio would then look
something like
void SDL_PauseAudio(int pause_on, int repeat_start);
Again, what has SDL_PauseAudio() to do with this?
Unless the SDL audio API becomes an API for communicating with pluggable
audio engines, that is. Otherwise, you just talk to the audio engine -
not SDL. (The audio engine you’re using might even decide to use some
other API than SDL for output…)
//David Olofson - Programmer, Composer, Open Source Advocate
.- Coming soon from VaporWare Inc…------------------------.
| The Return of Audiality! Real, working software. Really! |
| Real time and off-line synthesis, scripting, MIDI, LGPL…|
-----------------------------------> (Public Release RSN) -' .- M A I A -------------------------------------------------. | The Multimedia Application Integration Architecture |
----------------------------> http://www.linuxdj.com/maia -’
— http://olofson.net — http://www.reologica.se —On Friday 04 October 2002 10:05, Big Pilot wrote: