SDL_mixer resource leak fixes -> RWops revamp

Interesting. It must be a lot of work, though, to position the loop-to point
perfectly in a waveform so it’ll loop without popping!

BTW if you’ve got code to add cue chunk checking to .wav and .ogg files, could
you incorporate that into SDL_Mixer? It would definitely be helpful!>----- Original Message ----

From: Forest Hale
Subject: Re: [SDL] SDL_mixer resource leak fixes -> RWops revamp

On 04/26/2011 10:41 AM, Mason Wheeler wrote:

No, they have different capabilities. Tracked (“MOD”) music, for example,
has the all-important capability to loop to an arbitrary section of the song,
which is crucial for video game music. Waveform formats simply can’t
do this.

This can be done.

In DarkPlaces I parse the "cue " chunk from .wav files which specifies the loop
point (so when it hits the end of the sound, it goes back to this point),
unfortunately not many editors can write this chunk.

And for .ogg someone added custom tags to music which specifies the sample
position to loop to, and DarkPlaces looks for those tags.

That said, mod music has other nice features like custom commands which could
enable gameplay synchronized to the music, or vice versa.

I’ve been told that OpenAL can’t do this sort of intro+loop effect… how
strange.

P.S. Quake used the "cue " chunks in wav in the same way back in 1996 for its
intro+loop sound effects for door opening/lift moving sounds and all the ambient
sounds (swampy noises, torch crackle, flickering fluorescent lights, etc), this
is nothing new, a huge portion of its sound files had such looping.

Normally, you’d do this in a sound editor with loop finder tools and whatnot,
and using crossfades and other tricks to make it loop without popping, if
need be. This is one of the core jobs of getting instrument sounds into a
sampler, so there are many tried and tested tools and methods.On Wednesday 27 April 2011, at 01.48.51, Mason Wheeler wrote:

Interesting. It must be a lot of work, though, to position the loop-to
point perfectly in a waveform so it’ll loop without popping!


//David Olofson - Consultant, Developer, Artist, Open Source Advocate

.— Games, examples, libraries, scripting, sound, music, graphics —.
| http://consulting.olofson.net http://olofsonarcade.com |
’---------------------------------------------------------------------’