No Sound Output

<>

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

On Wednesday 02 November 2005 09:04 pm, John Popplewell wrote:


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

I’m talking about something more ide-neutral, for example, I install MinGW
without an IDE and want to install SDL, recompile the lib itself and all the
examples from the command line>From: Chris Nystrom

Reply-To: “A list for developers using the SDL library.
(includesSDL-announce)”
To: "A list for developers using the SDL library. (includes
SDL-announce)"
Subject: Re: [SDL] How to install SDL in Windows
Date: Wed, 2 Nov 2005 13:34:50 -0600

On 11/2/05, Sauc Jedi <@Sauc_Jedi> wrote:

Hello

I wonder if there exists any tutorial for installing SDL on Windows,
compiling it, etc.

Something like this?

http://gpwiki.org/index.php/SDL:Tutorials:Setup

Chris


E-Mail: Chris Nystrom
Business: http://www.shaklee.net/austin
Blog: http://conversazione.blogspot.com/
AIM: nystromchris


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

<>

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.

Ahh, I see here now:

$ ldd /usr/local/lib/libSDL_mixer-1.2.so.0 linux-gate.so.1 =>
(0xffffe000)
libvorbisfile.so.3 => /usr/lib/libvorbisfile.so.3 (0xb7f84000)
libvorbis.so.0 => /usr/lib/libvorbis.so.0 (0xb7f5c000)
libogg.so.0 => /usr/lib/libogg.so.0 (0xb7f57000)
libSDL-1.2.so.0 => /usr/local/lib/libSDL-1.2.so.0 (0xb7ebc000)
libpthread.so.0 => /lib/libpthread.so.0 (0xb7e6a000)
libc.so.6 => /lib/libc.so.6 (0xb7d52000)
libm.so.6 => /lib/libm.so.6 (0xb7d2e000)
libdl.so.2 => /lib/libdl.so.2 (0xb7d2a000)
libX11.so.6 => /usr/lib/libX11.so.6 (0xb7c5e000)
libXext.so.6 => /usr/lib/libXext.so.6 (0xb7c50000)
/lib/ld-linux.so.2 (0x80000000)
-------------- 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/b4439e16/attachment.pgpOn Thursday 03 November 2005 03:56 am, John Popplewell wrote:

<>

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.

Ahh, I see here now:

$ ldd /usr/local/lib/libSDL_mixer-1.2.so.0 linux-gate.so.1 =>
(0xffffe000)
libvorbisfile.so.3 => /usr/lib/libvorbisfile.so.3 (0xb7f84000)
libvorbis.so.0 => /usr/lib/libvorbis.so.0 (0xb7f5c000)
libogg.so.0 => /usr/lib/libogg.so.0 (0xb7f57000)
libSDL-1.2.so.0 => /usr/local/lib/libSDL-1.2.so.0 (0xb7ebc000)
libpthread.so.0 => /lib/libpthread.so.0 (0xb7e6a000)
libc.so.6 => /lib/libc.so.6 (0xb7d52000)
libm.so.6 => /lib/libm.so.6 (0xb7d2e000)
libdl.so.2 => /lib/libdl.so.2 (0xb7d2a000)
libX11.so.6 => /usr/lib/libX11.so.6 (0xb7c5e000)
libXext.so.6 => /usr/lib/libXext.so.6 (0xb7c50000)
/lib/ld-linux.so.2 (0x80000000)

Hmm. No joy there. Both using the same version of libSDL.
I’ve recently updated so I’m using libsdl-1.2.9-r1 and
sdl-mixer-1.2.6-r1. I’ve got an environment variable set:

export SDL_AUDIODRIVER=alsa

Also, if you’ve built SDL_mixer from source, you should find 2 test
programs: playwave and playmus in the SDL_mixer-1.2.6 source directory.
What do these programs do?

If you’ve built SDL itself from source then have a look in the 'test’
source directory and run configure then make to build the example
programs. The loopwave program reports what sound driver is in use.

What about other audio files, do they work?

Good Luck,

cheers,
John.On Thu, Nov 03, 2005 at 11:05:00AM -0500, Timm Murray wrote:

On Thursday 03 November 2005 03:56 am, John Popplewell wrote:


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

<>

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.

Ahh, I see here now:

$ ldd /usr/local/lib/libSDL_mixer-1.2.so.0 linux-gate.so.1 =>
(0xffffe000)
libvorbisfile.so.3 => /usr/lib/libvorbisfile.so.3 (0xb7f84000)
libvorbis.so.0 => /usr/lib/libvorbis.so.0 (0xb7f5c000)
libogg.so.0 => /usr/lib/libogg.so.0 (0xb7f57000)
libSDL-1.2.so.0 => /usr/local/lib/libSDL-1.2.so.0 (0xb7ebc000)
libpthread.so.0 => /lib/libpthread.so.0 (0xb7e6a000)
libc.so.6 => /lib/libc.so.6 (0xb7d52000)
libm.so.6 => /lib/libm.so.6 (0xb7d2e000)
libdl.so.2 => /lib/libdl.so.2 (0xb7d2a000)
libX11.so.6 => /usr/lib/libX11.so.6 (0xb7c5e000)
libXext.so.6 => /usr/lib/libXext.so.6 (0xb7c50000)
/lib/ld-linux.so.2 (0x80000000)

Hmm. No joy there. Both using the same version of libSDL.
I’ve recently updated so I’m using libsdl-1.2.9-r1 and
sdl-mixer-1.2.6-r1. I’ve got an environment variable set:

export SDL_AUDIODRIVER=alsa

With this, it can’t open the audio device:

Error opening audio: No available audio device

Also, if you’ve built SDL_mixer from source, you should find 2 test
programs: playwave and playmus in the SDL_mixer-1.2.6 source directory.
What do these programs do?

It’s built from the Gentoo ebuild. These programs don’t seem to be installed
with the ebuild.

If you’ve built SDL itself from source then have a look in the 'test’
source directory and run configure then make to build the example
programs. The loopwave program reports what sound driver is in use.

What about other audio files, do they work?

The ‘wavplay’ program does, as do the sounds in KDE.
-------------- 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/167c4e56/attachment.pgpOn Thursday 03 November 2005 04:40 pm, John Popplewell wrote:

On Thu, Nov 03, 2005 at 11:05:00AM -0500, Timm Murray wrote:

On Thursday 03 November 2005 03:56 am, John Popplewell wrote:

<>

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.

Ahh, I see here now:

$ ldd /usr/local/lib/libSDL_mixer-1.2.so.0 linux-gate.so.1 =>
(0xffffe000)
libvorbisfile.so.3 => /usr/lib/libvorbisfile.so.3 (0xb7f84000)
libvorbis.so.0 => /usr/lib/libvorbis.so.0 (0xb7f5c000)
libogg.so.0 => /usr/lib/libogg.so.0 (0xb7f57000)
libSDL-1.2.so.0 => /usr/local/lib/libSDL-1.2.so.0 (0xb7ebc000)
libpthread.so.0 => /lib/libpthread.so.0 (0xb7e6a000)
libc.so.6 => /lib/libc.so.6 (0xb7d52000)
libm.so.6 => /lib/libm.so.6 (0xb7d2e000)
libdl.so.2 => /lib/libdl.so.2 (0xb7d2a000)
libX11.so.6 => /usr/lib/libX11.so.6 (0xb7c5e000)
libXext.so.6 => /usr/lib/libXext.so.6 (0xb7c50000)
/lib/ld-linux.so.2 (0x80000000)

Hmm. No joy there. Both using the same version of libSDL.
I’ve recently updated so I’m using libsdl-1.2.9-r1 and
sdl-mixer-1.2.6-r1. I’ve got an environment variable set:

export SDL_AUDIODRIVER=alsa

With this, it can’t open the audio device:

Error opening audio: No available audio device

Also, if you’ve built SDL_mixer from source, you should find 2 test
programs: playwave and playmus in the SDL_mixer-1.2.6 source directory.
What do these programs do?

It’s built from the Gentoo ebuild. These programs don’t seem to be installed
with the ebuild.
If that’s the case, where have the versions of libSDL and libSDL_Mixer
installed here /usr/local/lib/ come from? Why is your program linking to them?

You seem to have two version of these libraries, that is often a recipe
for trouble. I would remove all traces of your local build, manually if
neccessary, maybe re-emerge libsdl and sdl-mixer or run ldconfig and
then rebuild the test program (delete any object and executable files
first). Make sure it is linking to the libraries in /usr/lib using ldd.

I’m out of ideas at this point,

cheers,
John.On Thu, Nov 03, 2005 at 11:53:52PM -0500, Timm Murray wrote:

On Thursday 03 November 2005 04:40 pm, John Popplewell wrote:

On Thu, Nov 03, 2005 at 11:05:00AM -0500, Timm Murray wrote:

On Thursday 03 November 2005 03:56 am, John Popplewell wrote:

If you’ve built SDL itself from source then have a look in the 'test’
source directory and run configure then make to build the example
programs. The loopwave program reports what sound driver is in use.

What about other audio files, do they work?

The ‘wavplay’ program does, as do the sounds in KDE.


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

Install MSys (from Mingw) as well as MSys DTK and you will be able to use
the standard UNIX build using ./configure make and make installOn 11/3/05, Sauc Jedi wrote:

I’m talking about something more ide-neutral, for example, I install MinGW
without an IDE and want to install SDL, recompile the lib itself and all
the
examples from the command line

From: Chris Nystrom
Reply-To: “A list for developers using the SDL library.
(includesSDL-announce)”
To: "A list for developers using the SDL library. (includes
SDL-announce)"
Subject: Re: [SDL] How to install SDL in Windows
Date: Wed, 2 Nov 2005 13:34:50 -0600

On 11/2/05, Sauc Jedi wrote:

Hello

I wonder if there exists any tutorial for installing SDL on Windows,
compiling it, etc.

Something like this?

http://gpwiki.org/index.php/SDL:Tutorials:Setup

Chris


E-Mail: Chris Nystrom
Business: http://www.shaklee.net/austin
Blog: http://conversazione.blogspot.com/
AIM: nystromchris


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


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

<>

It’s built from the Gentoo ebuild. These programs don’t seem to be
installed with the ebuild.

If that’s the case, where have the versions of libSDL and libSDL_Mixer
installed here /usr/local/lib/ come from? Why is your program linking to
them?
<>

Ahh, that was it. I’m not sure how that got into /usr/local (I don’t remember
ever installing from source, just the ebuild), but I got rid of it and linked
against the libraries in /usr/lib. The sound now plays fine.

Thanks for all your help!
-------------- 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/20051104/01a7a77f/attachment.pgpOn Friday 04 November 2005 01:27 am, John Popplewell wrote: