Setting callbacks for modules

Is there a way using either SDL_audio or SDL_mixer that allows setting a
callback when playing a module and a certain instruction is found in the
module pattern? If not, are there plans for this in the 1.3 API?

I’ve look through the headers and the closest thing I could find was
Mix_HookMusic.

Thanks!–
Ti Leggett
leggett at eecs.tulane.edu

I just want to throw in my two cents and say that I would personally find
something like this /very/ useful.

I too have looked through the SDL_mixer source, and not found anything. I
have also been experimenting with SDL_sound, and looked through its source,
but doesn’t seem like anything like this is there right now.On Tuesday 25 September 2001 8:48, Ti Leggett wrote:

Is there a way using either SDL_audio or SDL_mixer that allows setting a
callback when playing a module and a certain instruction is found in the
module pattern? If not, are there plans for this in the 1.3 API?

I’ve look through the headers and the closest thing I could find was
Mix_HookMusic.


Sam “Criswell” Hart <@Sam_Hart> AIM, Yahoo!:
Homepage: < http://www.geekcomix.com/snh/ >
PGP Info: < http://www.geekcomix.com/snh/contact/ >
Tux4Kids: < http://www.geekcomix.com/tux4kids/ >

Is there a way using either SDL_audio or SDL_mixer that allows setting a
callback when playing a module and a certain instruction is found in the
module pattern? If not, are there plans for this in the 1.3 API?

That’s another reason to use, say, the mikmod library directly. Although
I’m not sure it has the hook for what you’re asking for either…
(I haven’t looked to closely)

Another reason is if you store your samples in, say, an MTM file
(unsupported by SDL_mixer incidentally) and wish to use them as sound
effects… g

I doubt there will -ever- be hooks in SDL_mixer for this… the code
supports too many formats that arent module-based.

G’day, eh? :slight_smile:
- TeunisOn Tue, 25 Sep 2001, Ti Leggett wrote:

That’s another reason to use, say, the mikmod library directly. Although
I’m not sure it has the hook for what you’re asking for either…
(I haven’t looked to closely)

It appears that mikmod doesn’t support this either (unless it’s a
non-intuitive function/macro name). I do know the midas library
(http://www.s2.org/midas/) supports this and I thought this one of the
biggest selling points of using modules.

I doubt there will -ever- be hooks in SDL_mixer for this… the code
supports too many formats that arent module-based.

This is true but there is alpha channel support in SDL_image, and that
library supports graphic formats that don’t support alpha channels.

It wouldn’t even have to be callback neccessarily. It could be an event
that’s generated.

I think this would be worth it and since it’s an effect of all module
types, not adding a feature for only one format.

I’m not sure how the SDL submission guidelines work, but if I could hack
up something to address this, how likely would it be to get included?
i.e., should I just worry about making it work for me or think more
globally.On Tue, 25 Sep 2001, winterlion wrote: