14 Aug 19:41
Re: Audio Loop
Tom Mander <tom <at> proximitygroup.com>
2002-08-14 17:41:16 GMT
2002-08-14 17:41:16 GMT
Robert, Not really relevant to this group, but anyway... I assuming that the sound you have is a loopable sound - i.e. there are no discontinuities between the end of the file and the start if looped. Test this using "soundeditor" - it has a loop function. If the file is short, you could just read the whole lot into a buffer. Alternatively just continuously reread the file (just seeking back to the start from the end) and loop until interrupted. For a large file, you could even "adaptively cache" the samples into a memory mapped region with calls to madvise to encourage reclamation as needed (this last one is a slightly over the top, and most likely overengineering). The al calls don't care about file boundaries at all. Tom "Blickensdorf, Robert D" wrote: > How do command an SGI Onyx2 to continuously play an audio loop? I see how > you read and write marker and loop data to and from an audio file (aiff-c > files) through the "af" library calls. What I don't understand is how to > actually play a loop with the "al" library calls.
RSS Feed