The problems in the old version:

The SDL_Mixer docs say not to call any SDL_Mixer functions in a callback (Mix_ChannelFinished, etc).  We were calling lots (Mix_HaltMusic, Mix_FreeChunk, etc), which could be causing the problems described in the forum thread.  Also, Mix_FreeChunk does not invalidate the chunk, so Mix_GetChunk will return an invalid pointer if it is used on a freed channel.  The chunks vector is my way of guaranteeing that channels are not freed incorrectly.


On Thu, Apr 30, 2009 at 10:11 PM, Afletdinov A. <> wrote:
Explain changes in mixer engine.
What improvements?

> rev. 1053 Remove SDL_Mixer music and sound callbacks, as they're not really
necessary and potentially dangerous.
It is not enough your opinion. Where an errors?

> rev. 1067 Fix music resetting frequently. Fix lots of sound and music memory
These errors from last changes rev. 1053.

What for the Mixer::std::vector<Mix_Chunk *> is necessary? You do not trust
SDL_MixerFreeChunk, SDL_MixerGetChunk?

I agree with changes which correct any errors. What errors have corrected your
changes (if to compare to the old rev. 665)?
I do not accept such changes.
Please, return the old work version.

Register Now & Save for Velocity, the Web Performance & Operations
Conference from O'Reilly Media. Velocity features a full day of
expert-led, hands-on workshops and two days of sessions from industry
leaders in dedicated Performance & Operations tracks. Use code vel09scf
and Save an extra 15% before 5/3.
Fheroes2-devel mailing list