Possible bug report, and suggestions?

Hello. I recently dusted off the code for a game I’ve been working on
but haven’t touched for the past few months. I decided to use SDL,
since it offers a portible and unified suite for networking/audio
support.

I began attempting to get the game to load audio today, and ran into a
problem. I have some rather large music samples (12 megs) which are in
wave format. I decided to use the mixer library for loading and mixing
these. However, upon attempting to load these waves, I received
segfaults and the following message:
Fatal signal: Segmentation Fault (SDL Parachute Deployed)

I wasn’t sure whether this was an error in my code or a problem with
the large waves. To test this, I compiled the playwave demo and
attempted to play the 12 meg file. My results were the same; the file
didn’t play and I received the error. Furthermore, my program simply
hangs; it doesn’t exit. This is the same for playwave.

Another interesting fact to note is that playwave will play smaller
files, though it still hangs and reports the segfault error. My waves
are 48000 Hz, is this the problem? My code attempts to open the sound
device at 48000 Hz, so I’m not sure if there are frequency issues with
it.

If loading large waves isn’t possible, can anyone suggest a way of
encoding large music samples to make them smaller?

I began attempting to get the game to load audio today, and ran into a
problem. I have some rather large music samples (12 megs) which are in
wave format. I decided to use the mixer library for loading and mixing
these. However, upon attempting to load these waves, I received
segfaults and the following message:
Fatal signal: Segmentation Fault (SDL Parachute Deployed)

Is there anywhere I can download these to try them out on my system?

I wasn’t sure whether this was an error in my code or a problem with
the large waves. To test this, I compiled the playwave demo and
attempted to play the 12 meg file. My results were the same; the file
didn’t play and I received the error. Furthermore, my program simply
hangs; it doesn’t exit. This is the same for playwave.

The latest SDL snapshot demos archive has added support for streaming
WAVE files to the mixer library. This allows you to play large WAVE
files without loading them completely into memory. Try building the
playmus example program and passing your wave file to it on the command line.

Another interesting fact to note is that playwave will play smaller
files, though it still hangs and reports the segfault error.

That’s really odd. What’s your system configuration?

My waves are 48000 Hz, is this the problem? My code attempts to open the
sound device at 48000 Hz, so I’m not sure if there are frequency issues with
it.

No, that should be fine.

-Sam Lantinga				(slouken at devolution.com)

Lead Programmer, Loki Entertainment Software–
“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec

“Sam” == Sam Lantinga writes:

Sam> Is there anywhere I can download these to try them out on my
Sam> system?

Sure. You can grab them from my FTP site:
resnet-23-208.dorm.utexas.edu. They’re in the top-level directory.

Sam> The latest SDL snapshot demos archive has added support for
Sam> streaming WAVE files to the mixer library.  This allows you
Sam> to play large WAVE files without loading them completely into
Sam> memory.  Try building the playmus example program and passing
Sam> your wave file to it on the command line.

Hmm. With playmus, I get a split-second of audio, but the same results
occur. I have a question concerning the CVS archives. Is there an
actual CVS server available online, or are the CVS snapshots on the
downloads page the only available CVS versions? These results are
occuring with the sdl-demos.tar.gz archive which is timestamped Jun 6
17:05 CDT on my system; was a version released after that? Or should I
be fetching from a CVS server somewhere?

Sam> That's really odd.  What's your system configuration?

PPro, Debian 2.1, 64 megs of RAM and 64 megs of swap. Libc6 2.1.1. I’m
also using the latest SDL snapshots as of about 5 PM this afternoon.