[SDL] No Sound Output

John Popplewell john at johnnypops.demon.co.uk
Thu Nov 3 01:56:51 PST 2005


On Thu, Nov 03, 2005 at 12:26:51AM -0500, Timm Murray wrote:
> 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.
> 
OK, worth checking though.

> >
> > 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:
> >
Here I meant for you to use the path from the above output which would
be:

ldd  /usr/local/lib/libSDL_mixer-1.2.so.0

I'm just trying to confirm that the libSDL_mixer that you are using is
linked to the same libSDL that your app is using.

> > 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 
> (0xb7be4000)
>  libgcc_s.so.1 => /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/libgcc_s.so.1 
> (0xb7bdc000)
>  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:
> 
> http://bugs.gentoo.org/show_bug.cgi?id=99590
> 
> 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.
Thanks for passing this on.

Good Luck!

cheers,
John.


> _______________________________________________
> SDL mailing list
> SDL at libsdl.org
> http://www.libsdl.org/mailman/listinfo/sdl





More information about the SDL mailing list