removed


Clicking sounds and nothing sounds like the F-200 receiving a sound frequency it doesn't like. Try 22050 or 44100 and see if that fixes anything. Good luck! :)
 
LiX said:
Ah well i'm just using the default SDL sound system, really linear standard 22050khz thing.

Maybe that's the problem then? Has anyone else used SDL's standard sound system with success on the gp2x?
i use it all the time for all my games. Thing is the buffer on the gp2x needs to be smaller than on pc or your sound will play real slow. I did however compile the open2x libs from the svn not sure if that matters.

i open the mixer like this on the gp2x :
Mix_OpenAudio(22050,AUDIO_S16,MIX_DEFAULT_CHANNELS,128)
 
Last edited by a moderator:
joyrider said:
LiX said:
Ah well i'm just using the default SDL sound system, really linear standard 22050khz thing.

Maybe that's the problem then? Has anyone else used SDL's standard sound system with success on the gp2x?
i use it all the time for all my games. Thing is the buffer on the gp2x needs to be smaller than on pc or your sound will play real slow. I did however compile the open2x libs from the svn not sure if that matters.

i open the mixer like this on the gp2x :
Mix_OpenAudio(22050,AUDIO_S16,MIX_DEFAULT_CHANNELS,128)


Ah maybe that's the problem? I don't use SDL_Mixer I use SDL_OpenAudio().
 
Last edited by a moderator:
ah i never used sdl_openaudio myself, i'm always using SDL_Mixer functions, it's real easy to use:

CODE


//include
#include <SDL/SDL_Mixer.h>

//pointers
Mix_Chunk *Sound;
Mix_Music *Music;

//open the mixer
Mix_OpenAudio(22050,AUDIO_S16,MIX_DEFAULT_CHANNELS,128);

//load music & sound
Music = Mix_LoadMUS("./somemusicfile.mod");
Sound = Mix_LoadWAV("./somesoundfile.wav");

//playing the music & sound
Mix_PlayMusic(Music,0);
Mix_PlayChannel(-1,Sound,0);

//stopping music
Mix_HaltMusic();

//volume
Mix_Volume(0,64);
Mix_Volume(1,64);
Mix_VolumeMusic(64);

//close the mixer
Mix_CloseAudio();



it are just some example functions to give you an idea, so you can't actually copy / paste this and run it cause the program will quit directly. (since there's no loop)
 
I just want to point out that it works on an F100, it does however suffer a memory leak, so it runs for about a minute or so and then it dies.

And if run from gdb, it receives a "SIG32, real-time event 32" from somewhere within Mix_OpenAudio, if that is any help.
 
Parkydr said:
You get SIG32 all the time anyway (pthreads I think). Just ignore it with

handle SIG32 nostop

Special thanks to Joyrider, last night he managed to isolate the problem to the directory system.

Further optimizations have been made since then - but the game generally was not coded with
consideration to the power of the GP2X platform (being my first gp2x game).
 
Last edited by a moderator:
Back
Top