Sound cracks with SDL_mixer and AUDIO_S16LSB

I am having a strange problem: When playing back wav sounds sampled at 44 khz,
stereo, 16 bits signed with SDL_mixer, I am having short crackling sounds when
the sound starts and after it has ended. Any solution for this? Which would that
be?

(What versions? What platforms? Where can example WAVs be found?)

Are you sure you acquired that sound format?On Sat, Feb 7, 2009 at 8:28 AM, Dietfrid Mali wrote:

I am having a strange problem: When playing back wav sounds sampled at 44 khz,
stereo, 16 bits signed with SDL_mixer, I am having short crackling sounds when
the sound starts and after it has ended. Any solution for this? Which would that
be?


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


http://codebad.com/

Donny Viszneki <donny.viszneki gmail.com> writes:

(What versions? What platforms? Where can example WAVs be found?)

Are you sure you acquired that sound format?

Windows XP home ed. SP 3.

SDL_mixer 1.2.8.

The wav sounds fine in WMP. They are e.g. included in
http://www.descent2.de/downloads/hires-sounds.rar (24 MB).

The wav sounds fine in WMP. They are e.g. included in

You can’t trust WMP. Most polished media players have built-in
protection against crackling at the beginning and end of any audio
stream.

http://www.descent2.de/downloads/hires-sounds.rar (24 MB).

Too bad you didn’t just list the filenames and their checksums, I have
dxx-rebirth and might already have the files. Oh well.On Sat, Feb 7, 2009 at 1:54 PM, Dietfrid Mali wrote:


http://codebad.com/

Donny Viszneki <donny.viszneki gmail.com> writes:

Too bad you didn’t just list the filenames and their checksums, I have
dxx-rebirth and might already have the files. Oh well.

Rebirth doesn’t support hires sounds.
Unless you’re currently trying to work them into it.

I have however found out that this problem doesn’t exist.
I thought I was using the hires sound when I was infact
using low res sounds I was resampling on the fly.

Which leads me to another flaw in SDL_mixer.

Donny Viszneki <donny.viszneki gmail.com> writes:

Too bad you didn’t just list the filenames and their checksums, I have
dxx-rebirth and might already have the files. Oh well.

Rebirth doesn’t support hires sounds.
Unless you’re currently trying to work them into it.

Fair enough. IMHO the game should never be played without all the
original multimedia anyway!

I have however found out that this problem doesn’t exist.
I thought I was using the hires sound when I was infact
using low res sounds I was resampling on the fly.

Which leads me to another flaw in SDL_mixer.

Care to provide a small test case for the problem?On Sat, Feb 7, 2009 at 5:02 PM, Dietfrid Mali wrote:


http://codebad.com/

Donny Viszneki <donny.viszneki gmail.com> writes:

IMHO the game should never be played without all the
original multimedia anyway!

What are you trying to say here?

I’m saying I can’t relate to the desire to play classic games with
"enhanced" multimedia (ie. “hi-res textures” and “hi-res sound.”)

It’s partially an issue of nostalgia: I want to reproduce the
experience I had with the game when I originally played it.

But it’s also probably simply an artistic issue: The multimedia in my
favorite classic games was designed carefully! If you asked the
original authors to update the multimedia for more modern computers,
it would certainly take more time than what is typically put into
these “hi-res” media packs. It takes hard work and ingenuity to
translate conventional artistic talent into the low fidelity formats
that work for resource constrained gaming platforms, do you think you
can just pluck that careful work out of its intended context, smooth
some edges, and get something of higher quality? I think not.On Sat, Feb 7, 2009 at 7:10 PM, Dietfrid Mali wrote:

Donny Viszneki <donny.viszneki gmail.com> writes:

IMHO the game should never be played without all the
original multimedia anyway!

What are you trying to say here?


http://codebad.com/

Donny Viszneki <donny.viszneki gmail.com> writes:

I’m saying I can’t relate to the desire to play classic games with
"enhanced" multimedia (ie. “hi-res textures” and “hi-res sound.”)

It’s partially an issue of nostalgia: I want to reproduce the
experience I had with the game when I originally played it.

But it’s also probably simply an artistic issue: The multimedia in my
favorite classic games was designed carefully! If you asked the
original authors to update the multimedia for more modern computers,
it would certainly take more time than what is typically put into
these “hi-res” media packs. It takes hard work and ingenuity to
translate conventional artistic talent into the low fidelity formats
that work for resource constrained gaming platforms, do you think you
can just pluck that careful work out of its intended context, smooth
some edges, and get something of higher quality? I think not.

As this boils down to indirect criticism of the features of D2X-XL, may I ask
whether you know the sounds and hires textures of D2X-XL, or the other features
of this program?

Because currently you sound like you are just posting from theory without
really knowing what you are talking about.

As far as your die hard nostalgia goes: I suppose you never play any newer
sequel of an old classic you loved then? Because that would inevitably stray
from the experience you had when you first played the game.

Dude, until you prove otherwise I really think that your above remark is
plain and simply clueless. I am working on D2X-XL and DLE-XP (D1+D2 level
editor) for at least 5 years (actually lost track of it). I probably know
this program and workings better than the original authors. I have rewritten
a great part of the code (which was a mess), and added a lot of new code.

Do you think you can tell me anything about the validity of my efforts and
of all the contributors of sounds, textures, new game models and levels,
and whether they convey the original spirit of this game with rejuvenated
and improved graphics?

You may be playing Descent to see it in all it’s pixelated originality
to recall some feelings you had when you were way younger. Many people
play D2X-XL because they want to have the original, awesome gameplay of
Descent with at least somewhat modern graphics and effects.

To be open: I don’t think that there is anything you can tell me about my all
time favorite game, about the effort that went into it, and most of all about
what makes Descent Descent. As far as I am concerned: Descent is made Descent
by its gameplay in the first place, not by its graphics. That’s why so many
Descent 1 players don’t even like Descent 2, and many Descent 1 and 2 players
don’t like Descent 3. It’s because of gameplay issues, not because of the
graphics. The argument that a game is made by its graphics is either poor
in itself, or the game is a poor game.

I am a professional software developer and in the programming business for
almost 30 years. Sure, D2X-XL could be better or even need another engine.
That doesn’t mean I don’t know my business though. It just means I don’t
have that much time (or texture, sound, model and level artists at hand).

Now before you even reply: Go get the current D2X-XL version plus hires
content and play it! There’s a very stable beta release of the latest
version available (see www.descent2.de/forum).

karx

Donny Viszneki <donny.viszneki gmail.com> writes:

I’m saying I can’t relate to the desire to play classic games with
"enhanced" multimedia (ie. “hi-res textures” and “hi-res sound.”)

It’s partially an issue of nostalgia: I want to reproduce the
experience I had with the game when I originally played it.

But it’s also probably simply an artistic issue: The multimedia in my
favorite classic games was designed carefully! If you asked the
original authors to update the multimedia for more modern computers,
it would certainly take more time than what is typically put into
these “hi-res” media packs. It takes hard work and ingenuity to
translate conventional artistic talent into the low fidelity formats
that work for resource constrained gaming platforms, do you think you
can just pluck that careful work out of its intended context, smooth
some edges, and get something of higher quality? I think not.

As this boils down to indirect criticism of the features of D2X-XL, may I ask
whether you know the sounds and hires textures of D2X-XL, or the other features
of this program?

Because currently you sound like you are just posting from theory without
really knowing what you are talking about.

I’ve been tinkering around with d2x-rebirth. I think “without really
knowing what you are talking about” has different connotations than
your otherwise relevant argument: that d2x-xl is exceptional among
"hi-res media packs." I’ll definitely check it out.

As far as your die hard nostalgia goes: I suppose you never play any newer
sequel of an old classic you loved then? Because that would inevitably stray
from the experience you had when you first played the game.

I can name many more sequels that have destroyed my hopes than sequels
that have fulfilled them. I generally don’t find an opportunity play
games that don’t come highly recommended from a trusted source. When I
was younger I wasn’t as cynical, and I bought Descent 3, which was a
monumental waste of money.

Dude, until you prove otherwise I really think that your above remark is
plain and simply clueless. I am working on D2X-XL and DLE-XP (D1+D2 level
editor) for at least 5 years (actually lost track of it). I probably know
this program and workings better than the original authors. I have rewritten
a great part of the code (which was a mess), and added a lot of new code.

I don’t know how I could “prove” something this subjective. I think
everything in my email was merely theory generalized for application
to the entire gaming industry, and I think most people would agree
with my generalization.

I didn’t intend to detract your efforts. It sounds like you have a
great appreciate for Descent. It would be hard to convince me that you
would do it the injustice of poor additions.

Do you think you can tell me anything about the validity of my efforts and
of all the contributors of sounds, textures, new game models and levels,
and whether they convey the original spirit of this game with rejuvenated
and improved graphics?

Maybe. But ATM I feel safer making generalizations about the
industry/community as a whole.

You may be playing Descent to see it in all it’s pixelated originality
to recall some feelings you had when you were way younger. Many people
play D2X-XL because they want to have the original, awesome gameplay of
Descent with at least somewhat modern graphics and effects.

I never played the original Descent, I was introduced to the series
with Descent II. The MS DOS machine I first played it on had no sound,
but was fast enough to make the game look the way (I believe) the
authors wanted it to. As soon as my family owned a PC I bought a copy
for it. When I saw Descent Mission Builder at CompUSA I naively
shelled out the MSRP for it and started figuring out how to use the
game engine in ways that the authors probably never intended,
including certain graphical effects (using color-keyed star field
textures between monochromatic semi-transparent ‘cube’ faces and NULL
faces to create a “hyperspace” effect.)

I hope this demonstrates that I both appreciate the game without the
full multimedia, and can relate to a desire to make it do more.

That having been said, I take about as kindly to your slanted
description of my appreciation of the game as you seem to have taken
to my generalization about the emphasis of modernizing game graphics
(old and new for that matter.)

To be open: I don’t think that there is anything you can tell me about my all
time favorite game, about the effort that went into it, and most of all about
what makes Descent Descent. As far as I am concerned: Descent is made Descent
by its gameplay in the first place, not by its graphics. That’s why so many
Descent 1 players don’t even like Descent 2, and many Descent 1 and 2 players
don’t like Descent 3. It’s because of gameplay issues, not because of the
graphics. The argument that a game is made by its graphics is either poor
in itself, or the game is a poor game.

I don’t think I disagree with your point here, but I don’t think it’s
a good generalization. Would you do the same thing to Frogger or
Galaga?

I am a professional software developer and in the programming business for
almost 30 years. Sure, D2X-XL could be better or even need another engine.
That doesn’t mean I don’t know my business though. It just means I don’t
have that much time (or texture, sound, model and level artists at hand).

Now before you even reply: Go get the current D2X-XL version plus hires
content and play it! There’s a very stable beta release of the latest
version available (see www.descent2.de/forum).

It would be my luck that I should have read all but this last
paragraph before beginning to write my reply!

/me gets d2x-xlOn Sun, Feb 8, 2009 at 4:22 PM, Dietfrid Mali wrote:


http://codebad.com/

Donny Viszneki <donny.viszneki gmail.com> writes:

Whatever you say you are saying in a context. The current context for your
"theoretical excursion" was Descent and enhancements made to it. You cannot
expect your remarks to be accepted completely out of this context. :wink:

If you are going to install D2X-XL, please read the installation instructions
(http://www.descent2.de/d2x-install.html). The complete D2X-XL installation
has a lot of data, so it’s using subfolders unlike the original Descent
installation.

The best thing to do would be to make a clean Descent 1+2 install somewhere,
extract D2X-XL v1.13.127 over it, then extract the current beta over it
(extract using subfolders).

After that you can think of installing sounds, textures, models and custom
missions.

If you have any questions, probably the best place to getting them answered
is the D2X-XL forum (www.descent2.de/forum). You can also report bugs there
if you want to, but if I am meant to be looking into them, they must be
posted in the D2X-XL tracker system on Sourceforge.net.

karx

I can, did, and will continue to do so. “High-res media packs” suck.

:POn Sun, Feb 8, 2009 at 8:53 PM, Dietfrid Mali wrote:

Donny Viszneki <donny.viszneki gmail.com> writes:
Whatever you say you are saying in a context. The current context for your
"theoretical excursion" was Descent and enhancements made to it. You cannot
expect your remarks to be accepted completely out of this context. :wink:


http://codebad.com/

I can, did, and will continue to do so. “High-res media packs” suck.

I dunno. The Half-Life one made the game look a whole lot better IMO.>----- Original Message ----

From: Donny Viszneki <donny.viszneki at gmail.com>
Subject: Re: [SDL] sound cracks with SDL_mixer and AUDIO_S16LSB

Donny Viszneki <donny.viszneki gmail.com> writes:

Donny Viszneki <donny.viszneki gmail.com> writes:
Whatever you say you are saying in a context. The current context for your
"theoretical excursion" was Descent and enhancements made to it. You cannot
expect your remarks to be accepted completely out of this context. :wink:

I can, did, and will continue to do so. “High-res media packs” suck.

:stuck_out_tongue:

Insisting on ignoring the facts of life doesn’t make you look very smart.

Insisting on your personal (and in this case, highly questionable) opinion
being a universal standard doesn’t either.> On Sun, Feb 8, 2009 at 8:53 PM, Dietfrid Mali <karx11erx hotmail.com> wrote:

Insisting on ignoring the facts of life doesn’t make you look very smart.

Trickle down economics! There’s no such thing as climate change!

Insisting on your personal (and in this case, highly questionable) opinion
being a universal standard doesn’t either.

The Steelers are the best! McGriddles are gross!

“High-res media packs” suck!

(we really ought to not spam the mailing list like this)On Mon, Feb 9, 2009 at 5:32 PM, Dietfrid Mali wrote:


http://codebad.com/

So did you try D2X-XL now?

You could help me to get rid of that sound crackling issue … :slight_smile:

My first attempt to build was with the 1.13.127 source archive. I had
some problems with CRLF line endings in shell scripts, and then a
compiler error about a missing semicolon.

http://www.descent2.de/downloads/d2x-xl-src-1.13.127.rar

donny at teamspace:~/d2x-xl-1.13.127$ make
make all-recursive
make[1]: Entering directory /home/donny/d2x-xl-1.13.127' Making all in 2d make[2]: Entering directory/home/donny/d2x-xl-1.13.127/2d’
g+±3.3 -DHAVE_CONFIG_H -I. -I… -I …/include -I …/input/include -I
…/network/linux/include -I …/audio/linux/include -I
/usr/local/include/SDL -I/usr/local/include/SDL -D_GNU_SOURCE=1
-D_REENTRANT -O3 -g -Wall -Wno-char-subscripts -MT 2dsline.o -MD -MP
-MF .deps/2dsline.Tpo -c -o 2dsline.o 2dsline.cpp
In file included from …/include/inferno.h:2451,
from 2dsline.cpp:20:
…/include/multi.h:258: error: semicolon missing after declaration of `compType

Next I tried SVN trunk and didn’t have the CRLF problems (I suspect
the RAR archive ‘d2x-xl-makefiles.rar’ was generated under MSWindows.)
But I still had the same compiler error. I’ll look at the source code
in a bit, but first I wanted to ask this:

Why is d2x-xl C++?–
http://codebad.com/

Why is d2x-xl C++?

Better compiler diagnostics? I often use CFLAGS="-x c++ -Wall -Werror"
and then find all sorts of weird bugs, which never fails to impress
people at parties! ;-)On Wed, Feb 11, 2009 at 3:23 PM, Donny Viszneki <donny.viszneki at gmail.com> wrote:


http://pphaneuf.livejournal.com/

Donny Viszneki <donny.viszneki gmail.com> writes:

Next I tried SVN trunk and didn’t have the CRLF problems (I suspect
the RAR archive ‘d2x-xl-makefiles.rar’ was generated under MSWindows.)
But I still had the same compiler error. I’ll look at the source code
in a bit, but first I wanted to ask this:

Why is d2x-xl C++?

Donny,

v1.13.127 is outdated. The current D2X-XL head revision is a pretty stable
version of v1.14 beta. If you are trying to build D2X-XL on Linux, you can
either use the makefiles or the Eclipse project I have provided.

I try to keep line break problems out of the source archive, but do not always
manage to do so. I am amazed that you didn’t complain about my using rar instead
of zip. :stuck_out_tongue:

Looking into the source code from the D2X-XL head revision (and the dev blah in
my forum) could have answered your question: C++ allows me to use operator
overloading for better error checking, data encapsulation and automatic data
initialization and destruction for a cleaner and more secure data and memory
handling, template classes for code that’s easier to create, read and maintain,
and virtualization to easier handle certain program functionality (like the
various cockpits, or various menu renderers).

One immediate benefit of using template array classes with operator overloading
was that I caught quite a few array bounds violations that had been in the code
for years.

So the v1.14 source code doesn’t just have .cpp file extensions to make it look
cool.

That’s why.

Pierre Phaneuf <pphaneuf gmail.com> writes:

Why is d2x-xl C++?

Better compiler diagnostics? I often use CFLAGS="-x c++ -Wall -Werror"
and then find all sorts of weird bugs, which never fails to impress
people at parties!

Because I can! Hah!

Not just that. :stuck_out_tongue: See my reply to Donny for an answer.