SDL-mirror/src/audio
Sam Lantinga 3506c143db Date: 10 Jun 2003 15:30:59 -0400
From: Mike Shal
Subject: [SDL] Bug in SDL_wave.c?

Hey everyone, I'm not sure if this is a bug in SDL, or if I just have
incorrect WAV files.  The problem I'm having is loading multiple
concatenated WAVs from SDL_LoadWAV_RW.  Some WAV files put comments at
the end of the file (which may be bad form), and SDL doesn't skip past
them when reading from the RWops.  So the next WAV I try to load will
start at the comment section of the previous WAV, which obviously
doesn't work.  If anyone else is having this problem, one quick fix you
can do is run sox on the bad WAVs, which strips out all of the comment
sections.
Eg:

$ sox sound.wav tmp.wav
$ mv -f tmp.wav sound.wav

The other fix is to patch SDL_wave.c, which is included with this email.
(Assuming I made the patch correctly :).  All it does is calculate how
much remaining space there is in the WAV file after the data chunk, and
does SDL_RWseek to skip it.  I don't think it should interfere with
anything else, but if someone could check it that would be nice :).  If
the bug is really with SDL and not with my WAVs, can someone work this
into the next version of SDL? Thanks,

-Mike Shal

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401263
2006-01-24 07:20:18 +00:00
..
alsa Placate gcc's strict aliasing rules with an extra cast. 2005-10-20 06:53:56 +00:00
amigaos Updated copyright information for 2004 (Happy New Year!) 2004-01-04 16:49:27 +00:00
arts Date: Mon, 30 Aug 2004 18:20:25 +0200 2004-09-17 13:25:06 +00:00
baudio Updated copyright information for 2004 (Happy New Year!) 2004-01-04 16:49:27 +00:00
dart OS/2 port! 2005-11-23 07:29:56 +00:00
dc Updated copyright information for 2004 (Happy New Year!) 2004-01-04 16:49:27 +00:00
disk Updated copyright information for 2004 (Happy New Year!) 2004-01-04 16:49:27 +00:00
dma Date: Sat, 9 Oct 2004 02:46:18 +0300 (EEST) 2004-10-09 22:11:45 +00:00
dmedia Date: Sun, 18 Jul 2004 16:46:44 +0200 2004-07-18 18:33:28 +00:00
dsp Date: Tue, 01 Feb 2005 17:53:07 -0800 2005-02-12 19:39:08 +00:00
esd Date: Sun, 29 Feb 2004 20:28:27 +0200 2004-03-02 12:45:22 +00:00
macosx CoreAudio driver works on Mac OSX 10.1 2004-08-21 03:21:44 +00:00
macrom Mac Classic and CodeWarrior patches. 2005-09-08 06:34:28 +00:00
mint Sleep a bit less in thread 2005-08-16 09:57:16 +00:00
mme Updated copyright information for 2004 (Happy New Year!) 2004-01-04 16:49:27 +00:00
nas Updated copyright information for 2004 (Happy New Year!) 2004-01-04 16:49:27 +00:00
nto Updated copyright information for 2004 (Happy New Year!) 2004-01-04 16:49:27 +00:00
openbsd Patched OpenBSD audio to compile on newer GCC versions. 2005-11-22 15:11:33 +00:00
paudio Updated copyright information for 2004 (Happy New Year!) 2004-01-04 16:49:27 +00:00
riscos *** empty log message *** 2005-08-25 20:31:58 +00:00
sun Date: Tue, 22 Nov 2005 14:11:06 +0100 (MET) 2005-11-22 15:07:41 +00:00
ums Initial revision 2001-04-26 16:45:43 +00:00
windib Updated copyright information for 2004 (Happy New Year!) 2004-01-04 16:49:27 +00:00
windx5 Updated copyright information for 2004 (Happy New Year!) 2004-01-04 16:49:27 +00:00
.cvsignore Initial revision 2001-04-26 16:45:43 +00:00
Makefile.am *** empty log message *** 2005-05-16 04:45:07 +00:00
Makefile.wat OS/2 port! 2005-11-23 07:29:56 +00:00
SDL_audio.c Date: Tue, 13 Dec 2005 13:33:50 +0000 2005-12-13 16:40:12 +00:00
SDL_audio_c.h Updated copyright information for 2004 (Happy New Year!) 2004-01-04 16:49:27 +00:00
SDL_audiocvt.c *** empty log message *** 2004-12-13 08:49:17 +00:00
SDL_audiodev.c Commercial-OSS-on-Solaris patch... 2005-09-08 07:15:44 +00:00
SDL_audiodev_c.h Updated copyright information for 2004 (Happy New Year!) 2004-01-04 16:49:27 +00:00
SDL_audiomem.c Updated copyright information for 2004 (Happy New Year!) 2004-01-04 16:49:27 +00:00
SDL_audiomem.h Updated copyright information for 2004 (Happy New Year!) 2004-01-04 16:49:27 +00:00
SDL_mixer.c Updated copyright information for 2004 (Happy New Year!) 2004-01-04 16:49:27 +00:00
SDL_mixer_m68k.c Updated copyright information for 2004 (Happy New Year!) 2004-01-04 16:49:27 +00:00
SDL_mixer_m68k.h Updated copyright information for 2004 (Happy New Year!) 2004-01-04 16:49:27 +00:00
SDL_mixer_MMX.c From: "Alex Volkov" <avcp-sdlmail@usa.net> 2005-09-27 12:14:17 +00:00
SDL_mixer_MMX.h Date: Fri, 31 Dec 2004 04:14:09 +0900 2005-01-02 05:05:21 +00:00
SDL_mixer_MMX_VC.c OS/2 port! 2005-11-23 07:29:56 +00:00
SDL_mixer_MMX_VC.h Greatly simplified the SDL CPU info code 2003-11-24 09:22:12 +00:00
SDL_sysaudio.h OS/2 port! 2005-11-23 07:29:56 +00:00
SDL_wave.c Date: 10 Jun 2003 15:30:59 -0400 2006-01-24 07:20:18 +00:00
SDL_wave.h Updated copyright information for 2004 (Happy New Year!) 2004-01-04 16:49:27 +00:00