SDL test program, no sound but no error either

I compiled and ran an SDL test program made in KDE KDevelop on gentoo.

The program runs but it does not produce a sound as expected. Neither does
it output an error. The source code is on this page:
http://gpwiki.org/index.php/C:Playing_a_WAV_Sound_File_With_SDL_mixer
Any help would be a appreciated.–
View this message in context: http://www.nabble.com/SDL-test-program%2C-no-sound-but-no-error-either-tp15666330p15666330.html
Sent from the SDL mailing list archive at Nabble.com.

I compiled and ran an SDL test program made in KDE KDevelop on gentoo.

The program runs but it does not produce a sound as expected. Neither does
it output an error. The source code is on this page:
http://gpwiki.org/index.php/C:Playing_a_WAV_Sound_File_With_SDL_mixer
Any help would be a appreciated.

Try:

SDL_AUDIODRIVER=alsa ./yourapp

Is the same?

I don’t know if SDL uses ALSA automatically when you have disabled OSS
support (as I have seen from your USE-flags).

Are you trying to play a WAV-file or something different? What are the
USE-flag of sdl-mixer? What is the output of:

emerge -pv sdl-mixerAm Sonntag, den 24.02.2008, 09:06 -0800 schrieb degras:

SDL_AUDIODRIVER=alsa ./yourapp
is yourapp the name of my executable ?

Are you trying to play a WAV-file or something different?
yes

emerge -pv sdl-mixer
These are the packages that would be merged, in order:

Calculating dependencies… done!
[ebuild R ] media-libs/sdl-mixer-1.2.8 USE=“mikmod vorbis -mp3
-timidity” 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB–
View this message in context: http://www.nabble.com/SDL-test-program%2C-no-sound-but-no-error-either-tp15666330p15667173.html
Sent from the SDL mailing list archive at Nabble.com.

SDL_AUDIODRIVER=alsa ./yourapp
is yourapp the name of my executable ?

Yes of course.

emerge -pv sdl-mixer
These are the packages that would be merged, in order:

Calculating dependencies… done!
[ebuild R ] media-libs/sdl-mixer-1.2.8 USE=“mikmod vorbis -mp3
-timidity” 0 kB

This meens for example that you have MP3 support disabled (probably for
your whole system). Als Timidity support is disabled on your system,
that means you will not be able to play midi-files.

You should really read some documentations about USE-flags and enable
some standard USE-flags. Or do you really don’t want MP3 support?Am Sonntag, den 24.02.2008, 10:12 -0800 schrieb degras:

SDL_AUDIODRIVER=alsa ./yourapp

Also no sound is produced.