![]() |
SDL Alsa and CPU load. | ![]() |
![]() |
SDL Alsa and CPU load. | ![]() |
Sam Lantinga
![]() |
![]() |
What's the output with the environment variable SDL_AUDIO_ALSA_DEBUG=1 ?
On Mon, Oct 26, 2009 at 10:42 AM, GrosBob LeBlanc wrote:
-- -Sam Lantinga, Founder and President, Galaxy Gameworks LLC |
||||||||||||
|
![]() |
![]() |
GrosBob LeBlanc
![]() |
![]() |
Thanks for the fast answer.
Here is the output of the program after setting the environment variable SDL_AUDIO_ALSA_DEBUG=1 ALSA: period size = 64, periods = 16, buffer size = 1024 Then, several seconds later i got: ALSA lib pcm.c:7228:(snd_pcm_recover) underrun occured I have no more traces on the terminal. For information, i'm trying to play 22050hz AUDIO_S16LSB mono channel samples, with a format.samples set to 512. Regards |
||||||||||
|
![]() |
Additionnal information | ![]() |
GrosBob LeBlanc
![]() |
![]() |
I have additionnal information:
I recompiled my emulator to use a larger sample buffer (1024 values instead of 512). The CPU load immediatly lowered to more normal values, but i get a bigger latency. I can imagine that ALSA is more cpu intensive compare to OSS (?). 512 values at 22050Hz give 23 ms, this is quite an eternity for a cpu. Do you think this is a too optimistic value ? Nevertheless, the CPU load is clearly lower using OSS. Regards |
||||||||||
|