CVS compilation error with ALSA support

When trying to compile SDL from CVS with ALSA support it throws:

In file included from SDL_alsa_audio.h:27,
from SDL_alsa_audio.c:42:
/usr/include/sys/asoundlib.h:1: warning: #warning This header is deprecated,
use <alsa/asoundlib.h> instead.
SDL_alsa_audio.c:69: parse error before *' SDL_alsa_audio.c: In functioninit_pcm_cparams’:
SDL_alsa_audio.c:71: snd_pcm_channel_params_t' undeclared (first use in this function) SDL_alsa_audio.c:71: (Each undeclared identifier is reported only once SDL_alsa_audio.c:71: for each function it appears in.) SDL_alsa_audio.c:71:cparams’ undeclared (first use in this function)
SDL_alsa_audio.c:73: SND_PCM_CHANNEL_PLAYBACK' undeclared (first use in this function) SDL_alsa_audio.c:74:SND_PCM_MODE_BLOCK’ undeclared (first use in this
function)
SDL_alsa_audio.c:76: SND_PCM_STOP_STOP' undeclared (first use in this function) SDL_alsa_audio.c:77:SND_PCM_SFMT_S16_LE’ undeclared (first use in this
function)
SDL_alsa_audio.c: In function Audio_Available': SDL_alsa_audio.c:98:snd_pcm_channel_params_t’ undeclared (first use in this
function)
SDL_alsa_audio.c:98: parse error before cparams' SDL_alsa_audio.c:106:cparams’ undeclared (first use in this function)
SDL_alsa_audio.c:108: SND_PCM_OPEN_PLAYBACK' undeclared (first use in this function) SDL_alsa_audio.c:108:SND_PCM_OPEN_NONBLOCK’ undeclared (first use in this
function)
SDL_alsa_audio.c:108: warning: passing arg 2 of snd_pcm_open' makes pointer from integer without a cast SDL_alsa_audio.c:111: warning: implicit declaration of functionsnd_pcm_plugin_params’
SDL_alsa_audio.c: At top level:
SDL_alsa_audio.c:246: parse error before cstatus' SDL_alsa_audio.c:246: warning: type defaults toint’ in declaration of
cstatus' SDL_alsa_audio.c:246: warning: data definition has no type or storage class SDL_alsa_audio.c: In functionPCM_PlayAudio’:
SDL_alsa_audio.c:254: warning: implicit declaration of function
snd_pcm_plugin_write' SDL_alsa_audio.c:269: warning: implicit declaration of functionsnd_pcm_plugin_status’
SDL_alsa_audio.c:274: request for member status' in something not a structure or union SDL_alsa_audio.c:274:SND_PCM_STATUS_UNDERRUN’ undeclared (first use in this
function)
SDL_alsa_audio.c:275: request for member status' in something not a structure or union SDL_alsa_audio.c:275:SND_PCM_STATUS_READY’ undeclared (first use in this
function)
SDL_alsa_audio.c:280: warning: implicit declaration of function
snd_pcm_plugin_prepare' SDL_alsa_audio.c:280:SND_PCM_CHANNEL_PLAYBACK’ undeclared (first use in this
function)
SDL_alsa_audio.c: In function PCM_CloseAudio': SDL_alsa_audio.c:317: warning: implicit declaration of functionsnd_pcm_plugin_flush’
SDL_alsa_audio.c:317: SND_PCM_CHANNEL_PLAYBACK' undeclared (first use in this function) SDL_alsa_audio.c: In functionPCM_OpenAudio’:
SDL_alsa_audio.c:334: snd_pcm_channel_params_t' undeclared (first use in this function) SDL_alsa_audio.c:334: parse error beforecparams’
SDL_alsa_audio.c:335: snd_pcm_channel_setup_t' undeclared (first use in this function) SDL_alsa_audio.c:341:cparams’ undeclared (first use in this function)
SDL_alsa_audio.c:348: SND_PCM_OPEN_PLAYBACK' undeclared (first use in this function) SDL_alsa_audio.c:348:SND_PCM_OPEN_NONBLOCK’ undeclared (first use in this
function)
SDL_alsa_audio.c:348: warning: passing arg 2 of snd_pcm_open' makes pointer from integer without a cast SDL_alsa_audio.c:376:SND_PCM_SFMT_U8’ undeclared (first use in this
function)
SDL_alsa_audio.c:380: SND_PCM_SFMT_S8' undeclared (first use in this function) SDL_alsa_audio.c:384:SND_PCM_SFMT_S16_LE’ undeclared (first use in this
function)
SDL_alsa_audio.c:388: SND_PCM_SFMT_S16_BE' undeclared (first use in this function) SDL_alsa_audio.c:392:SND_PCM_SFMT_U16_LE’ undeclared (first use in this
function)
SDL_alsa_audio.c:396: SND_PCM_SFMT_U16_BE' undeclared (first use in this function) SDL_alsa_audio.c:433:csetup’ undeclared (first use in this function)
SDL_alsa_audio.c:434: SND_PCM_CHANNEL_PLAYBACK' undeclared (first use in this function) SDL_alsa_audio.c:435: warning: implicit declaration of functionsnd_pcm_plugin_setup’
SDL_alsa_audio.c:490: warning: implicit declaration of function
snd_pcm_file_descriptor' SDL_alsa_audio.c:501: warning: implicit declaration of functionsnd_pcm_playback_go’
make[3]: *** [SDL_alsa_audio.lo] Error 1
make[3]: Saliendo directorio /home/ernesto/src/SDL12/src/audio/alsa' make[2]: *** [all-recursive] Error 1 make[2]: Saliendo directorio/home/ernesto/src/SDL12/src/audio’
make[1]: *** [all-recursive] Error 1
make[1]: Saliendo directorio `/home/ernesto/src/SDL12/src’
make: *** [all-recursive] Error 1

It doesn’t happens with the SDL-1.2.4 release and I’m using the 0.9.0beta12 of
the ALSA library.

Greettings.
Ernesto.

When trying to compile SDL from CVS with ALSA support it throws:

[errors snipped]

It doesn’t happens with the SDL-1.2.4 release and I’m using the 0.9.0beta12 of
the ALSA library.

That’s odd, because they have exactly the same code. :slight_smile:

Anyway, the ALSA support needs to be updated, and I have never gotten ALSA
working, and nobody else seems to care enough to update it.

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment

Anyway, the ALSA support needs to be updated, and I have never gotten ALSA
working, and nobody else seems to care enough to update it.

Well, I took a look at the latest ALSA beta, and to my pleasant surprise,
it works on my system. So, I updated the SDL ALSA driver in CVS to ALSA 0.9.
Let me know if you have any problems.

http://www.libsdl.org/cvs.html

I did notice one bug where setting an audio rate that isn’t supported results
in a crash in the ALSA libraries, but since the ALSA test program did the same
thing, I’m not worried about it.

See ya!
-Sam Lantinga, Software Engineer, Blizzard Entertainment

Well, I’m glad to know that ALSA is working for you now =)

I tried the last CVS and is working for me too with ALSA support.

Anyway, I will like to know what did you think if is better to use ALSA or
OSS.

Greettings.
Ernesto.

El Lun 15 Abr 2002 04:47, Sam Lantinga escribi?:> > Anyway, the ALSA support needs to be updated, and I have never gotten

ALSA working, and nobody else seems to care enough to update it.

Well, I took a look at the latest ALSA beta, and to my pleasant surprise,
it works on my system. So, I updated the SDL ALSA driver in CVS to ALSA
0.9. Let me know if you have any problems.

http://www.libsdl.org/cvs.html

I did notice one bug where setting an audio rate that isn’t supported
results in a crash in the ALSA libraries, but since the ALSA test program
did the same thing, I’m not worried about it.

See ya!
-Sam Lantinga, Software Engineer, Blizzard Entertainment

Anyway, I will like to know what did you think if is better to use ALSA or
OSS.

Either should be fine. I’ve worked more with the OSS stuff, so I’m more
confident that the code is correct, but I didn’t notice any obvious problems
with ALSA on my hardware.

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment

As just noted, I’ve installed ALSA 0.9 for this purpose. If I find bugs,
you’ll be the first to know.On Mon, Apr 15, 2002 at 10:39:48AM -0700, Sam Lantinga wrote:

Anyway, I will like to know what did you think if is better to use ALSA or
OSS.

Either should be fine. I’ve worked more with the OSS stuff, so I’m more
confident that the code is correct, but I didn’t notice any obvious problems
with ALSA on my hardware.


Joseph Carter I N33D MY G4M3Z, D00D!!!111!!
(Just … don’t ask)

Where do you think you’re going today?

-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 273 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20020415/51942f90/attachment.pgp