Audio with SDL
Hi --
I''m trying to synthesize music in realtime, using SDL for audio output (not SDL_mixer -- using callbacks to fill the sample buffer, etc).
I''m having some problems.
The callback just copies data from a buffer to the sample buffer every 10ms.. the main loop simply checks if theres less than 10ms of audio data ready, if there''s not it will generate some.
However, there are overruns all the time, clicks and pops, and I''m not sure its the most efficient method.
Can anyone help? Thanks
10ms is almost certainly too short a time span. That''s 100 updates per second. I''d try moving that up to 50ms at least.
[ MSVC Fixes | STL Docs | SDL | Game AI | Sockets | C++ Faq Lite | Boost
Asking Questions | Organising code files | My stuff | Tiny XML | STLPort]
[ MSVC Fixes | STL Docs | SDL | Game AI | Sockets | C++ Faq Lite | Boost
Asking Questions | Organising code files | My stuff | Tiny XML | STLPort]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement