Fast Way To Play Sound Effects


synkro

0xdeadbeef
Joined
Aug 26, 2003
Messages
823
Location
Germany
Website
Visit site
Even though I know most of you are probably using SDL_Mixer, there must be a faster, less bloated way. I tried to play samples with mikmod, but it's slow and delayed :( Is there a fast way to instant playback sound effects (even low quality is fine with me)
 
synkro said:
Even though I know most of you are probably using SDL_Mixer, there must be a faster, less bloated way. I tried to play samples with mikmod, but it's slow and delayed :( Is there a fast way to instant playback sound effects (even low quality is fine with me)

You could open thesound device, e.g. fopen /dev/dsp and feed it the data like described here
http://www.oreilly.de/catalog/multilinux/excerpt/ch14-01.htm
But keep in mind SDL_mixer is doing more or less the same.

I think with fast you mean mixing sounds fast and with few resources as possible, or ?
like fmod e.g. does it.

Delays in sound can be various things. With SDL mostly it is the buffer size you are feeding.
Mikmod is a pain in the ass on the GP2X. In my last project I switched from Mikmod to Ogg on the GP2X,
You could try using ogg940 for ogg playback via the second processor which would be pretty "fastt".


regards
paines
 
Last edited by a moderator:
synkro said:
I have a look into that even though this is the wrong place, should I double post?
Hi,

I would recommend you to use WAV instead of mods for fasts soundfx and maybe use SDL_RWops ...
 
Last edited by a moderator:
Hi,

I read this as you wanting to just use the standard GP32 sdk..
If you save your wav file as a raw binary and use bin2c or something then GpPcmPlay will do the job. Make sure you GpPcmInit with the right settings for the sample!

hope that helps :)
 
Back
Top