SDL_mixer enhancements

Hi,
I’ve added a function to the SDL mixer that lets you read where in a
module you are - current order position and current row. Two questions:

  1. How do I submit these changes to the SDL_mixer source? It’s very
    useful for syncing things like demos where you want to do effects at an
    exact point in the music.
  2. Where can I find out the relationship between the current MP3 frame
    and the current song time? This is so can add the same functionality to
    the mixer when it’s playing an MP3. This is not strictly necessary since
    I could just return the current frame but would be a nice to have.

Paul.–

Unix is user-friendly. It just chooses its friends carefully.

Hi,
I’ve added a function to the SDL mixer that lets you read where in a
module you are - current order position and current row.

This is great – it seems like graphics get all the attention and sound
usually gets ignored. How hard would it be to be able to also set these
parameters –
i.e. jump to a row in a mod or loop certain rows?On Thu, 14 Sep 2000, Paul Furber wrote:

Hi,
I’ve added a function to the SDL mixer that lets you read where in a
module you are - current order position and current row.

This is great – it seems like graphics get all the attention and sound
usually gets ignored. How hard would it be to be able to also set these
parameters –
i.e. jump to a row in a mod or loop certain rows?

You’re probably better off using the libmikmod in the SDL_mixer library
directly with the SDL driver. The SDL_mixer music interface isn’t designed
for that kind of API because very few music formats are that flexible.

You can plug your own music callback into the SDL_mixer API and seamlessly
handle that kind of complexity in your own code while still using SDL_mixer
for the other sound effects in the game.

See ya!
-Sam Lantinga, Lead Programmer, Loki Entertainment Software> On Thu, 14 Sep 2000, Paul Furber wrote:

You can plug your own music callback into the SDL_mixer API and seamlessly
handle that kind of complexity in your own code while still using SDL_mixer
for the other sound effects in the game.

And when you’re done, post the sourcecode!!! :slight_smile:

-bill!

William Kendrick wrote:

You can plug your own music callback into the SDL_mixer API and seamlessly
handle that kind of complexity in your own code while still using SDL_mixer
for the other sound effects in the game.

Ok - I think I know what Sam’s getting at. The way I did it was to add
some functions to libmikmod and then wrap them in the main API of
SDL_mixer.c. If it’s a MOD or an MP3 you’re playing Get_Pos() returns
something useful otherwise it does nothing. The problem is it’s a bunch
of hacks to /libmikmod and SDL Mixer (er - and SMPEG :slight_smile: which is not
very clean. Jumping to an arbitrary position wouldn’t be too hard btw.
I’ll investigate the callback way of doing it instead.

And when you’re done, post the sourcecode!!! :slight_smile:

Sure will.

Paul.

P.S. I play too much defendguin when I should be working. What can I do?–

Unix is user-friendly. It just chooses its friends carefully.