SDL and ALSA (for capture), do they interfere or disturb each other?

Hi,

i’d like to write a simple program that opens
an SDL window, opens ALSA to capture some
audio samples into a buffer and display them in
the SDL window.

I don’t open or initialise SDL_AUDIO, as i want
to do audio only with ALSA.

I attached the whole project to this mail.

If i initialise SDL, the program fails, if i don’t
use SDL (tune.c, line 41) it works ok, else it
crashes, but it doesn’t crash if i don’t call any
ALSA functions.

It looks to me that ALSA and SDL disturb each other,
is that correct? What can i do about that?

Thanks for hints,
Torsten.
-------------- next part --------------
A non-text attachment was scrubbed…
Name: tune.tar.gz
Type: application/x-tgz
Size: 4766 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20040208/b0d1a959/attachment.bin

It looks to me that ALSA and SDL disturb each other,
is that correct? What can i do about that?

They shouldn’t, if you didn’t use SDL_OpenAudio(), and didn’t use
SDL_INIT_AUDIO when calling SDL_Init().

–ryan.

Hi,

They shouldn’t, if you didn’t use SDL_OpenAudio(), and didn’t use
SDL_INIT_AUDIO when calling SDL_Init().

there was another mistake in memory management of my program.
It was quite a stupid thing, i chose 0 as the second parameter
to calloc().

Best regards,
Torsten.