Hi,
I was wondering if any one has had the Mix_SetPostMix() function working before. I have some code working in linux which is simple enough to to run on the gp2x. The code I have is laid out like this:
CODE
Mix_SetPostMixvoid monoScope(void *udata, Uint8 *stream, int length)
{
//Monoscope code goes here
}
void startMonoscope(SDL_Surface *surface)
{
Mix_SetPostMix(monoScope, NULL);
}
void stopMonoscope()
{
while(!Mix_UnregisterAllEffects(0));
}
After I load a MP3 I call the startMonoscope function and then start playing the MP3. How ever the gp2x seems to lock before the MP3 is played. I worked out that it is the Mix_SetPostMix(monoScope, NULL) causing the lock up. If I comment it out, the code works fine. I checked the SDL_Mixer documentation and it seems to be correct what I am doing.
Can anyone suggest why this happens?
Thanks in advance
I was wondering if any one has had the Mix_SetPostMix() function working before. I have some code working in linux which is simple enough to to run on the gp2x. The code I have is laid out like this:
CODE
Mix_SetPostMixvoid monoScope(void *udata, Uint8 *stream, int length)
{
//Monoscope code goes here
}
void startMonoscope(SDL_Surface *surface)
{
Mix_SetPostMix(monoScope, NULL);
}
void stopMonoscope()
{
while(!Mix_UnregisterAllEffects(0));
}
After I load a MP3 I call the startMonoscope function and then start playing the MP3. How ever the gp2x seems to lock before the MP3 is played. I worked out that it is the Mix_SetPostMix(monoScope, NULL) causing the lock up. If I comment it out, the code works fine. I checked the SDL_Mixer documentation and it seems to be correct what I am doing.
Can anyone suggest why this happens?
Thanks in advance