[SDL] No Sound Output

Timm Murray tmurray-sdl at wumpus-cave.net
Wed Nov 2 21:26:51 PST 2005

On Wednesday 02 November 2005 09:04 pm, John Popplewell wrote:
> I'm on Gentoo. Your program builds and works here. It doesn't handle
> bad/missing file paths well, but it does play. I'd recommend checking the
> return value from SDL_Init(). Something like this:
>     ret = SDL_Init(SDL_INIT_AUDIO);
>     if ( 0 > ret ) {
>         printf("Error initialising SDL: %s\n", SDL_GetError());
>         exit(1);
>     }

Added this line, and it passes through it fine.

> What do you get if you do:
> ldd ./play_sound

$ ldd play_sound
 linux-gate.so.1 =>  (0xffffe000)
 libSDL-1.2.so.0 => /usr/local/lib/libSDL-1.2.so.0 (0xb7f4f000)
 libpthread.so.0 => /lib/libpthread.so.0 (0xb7ed4000)
 libSDL_mixer-1.2.so.0 => /usr/local/lib/libSDL_mixer-1.2.so.0 (0xb7e8a000)
 libc.so.6 => /lib/libc.so.6 (0xb7d72000)
 libm.so.6 => /lib/libm.so.6 (0xb7d4f000)
 libdl.so.2 => /lib/libdl.so.2 (0xb7d4b000)
 libX11.so.6 => /usr/lib/libX11.so.6 (0xb7c7e000)
 libXext.so.6 => /usr/lib/libXext.so.6 (0xb7c70000)
 /lib/ld-linux.so.2 (0xb7feb000)
 libvorbisfile.so.3 => /usr/lib/libvorbisfile.so.3 (0xb7c68000)
 libvorbis.so.0 => /usr/lib/libvorbis.so.0 (0xb7c40000)
 libogg.so.0 => /usr/lib/libogg.so.0 (0xb7c3b000)

> What about if you do ldd on the fullpath to libSDL_mixer? I get:
> ldd /usr/lib/libSDL_mixer-1.2.so.0

$ ldd /usr/lib/libSDL_mixer-1.2.so.0
 linux-gate.so.1 =>  (0xffffe000)
 libvorbisfile.so.3 => /usr/lib/libvorbisfile.so.3 (0xb7faf000)
 libvorbis.so.0 => /usr/lib/libvorbis.so.0 (0xb7f87000)
 libogg.so.0 => /usr/lib/libogg.so.0 (0xb7f82000)
 libsmpeg-0.4.so.0 => /usr/lib/libsmpeg-0.4.so.0 (0xb7f21000)
 libSDL-1.2.so.0 => /usr/lib/libSDL-1.2.so.0 (0xb7e97000)
 libpthread.so.0 => /lib/libpthread.so.0 (0xb7e1c000)
 libmikmod.so.2 => /usr/lib/libmikmod.so.2 (0xb7ddd000)
 libdl.so.2 => /lib/libdl.so.2 (0xb7dd9000)
 libc.so.6 => /lib/libc.so.6 (0xb7cc1000)
 libm.so.6 => /lib/libm.so.6 (0xb7c9e000)
 libstdc++.so.5 => /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/libstdc++.so.5 
 libgcc_s.so.1 => /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/libgcc_s.so.1 
 libdirectfb-0.9.so.22 => /usr/lib/libdirectfb-0.9.so.22 (0xb7b7f000)
 libfusion-0.9.so.22 => /usr/lib/libfusion-0.9.so.22 (0xb7b77000)
 libdirect-0.9.so.22 => /usr/lib/libdirect-0.9.so.22 (0xb7b6b000)
 libz.so.1 => /lib/libz.so.1 (0xb7b56000)
 libX11.so.6 => /usr/lib/libX11.so.6 (0xb7a8a000)
 libXext.so.6 => /usr/lib/libXext.so.6 (0xb7a7c000)
 libvga.so.1 => /usr/lib/libvga.so.1 (0xb7a12000)
 /lib/ld-linux.so.2 (0x80000000)

> I had a problem with SDL_Mixer and using an external libmikmod (the default
> on Gentoo). It kept trying to create files ('music.raw'?) on the hardrive,
> and if it couldn't then SDL audio initialisation failed. I manually rebuilt
> SDL_mixer whilst disabling use of an external libmikmod.

This doesn't appear to be the problem here.  FYI--I checked and there is a 
Gentoo bug report for this:


It appears to be fixed in the 1.2.6-r1 ebuild for sdl_mixer.  I've upgraded to 
this, but still don't get any sound.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20051103/bf61634f/attachment-0008.pgp>

More information about the SDL mailing list