Mercurial > sdl-ios-xcode
annotate src/audio/Makefile.am @ 773:da0a2ad35bf4
Date: Sun, 4 Jan 2004 23:48:19 +0100
From: Max Horn
Subject: Re: Again Audio CD patch
Am 04.01.2004 um 22:38 schrieb Sam Lantinga:
>
> Okay, I fixed the buffering problems by simply using a 4 second buffer
> instead of a 1 second buffer. However, using your code I can't play an
> entire CD - the playback stops after the first song.
>
Found the problem: FSReadFork returns eofErr when the file is finished.
However, we check its return value for errors, and if anything but
noErr occurs, the reader thread aborts its current iteration. That is
bad, because it aborts before it can ever set the flag which tells that
the file is over (also, any remaining data which FSRead did return is
lost - so you'd not hear about to 4 seconds from the end of the file.
Furthermore, the computed data size was 8 bytes to high (I forgot to
account for the fact that the size of an (A)IFF chunk always contains
the chunk header & size fields, too). This is enough to make it work.
However, the end condition is rather fragile, so I tuned some other
things to be pessimistic (check for <= 0 instead of == 0, when eofErr
is encountered enforce mReadFilePosition == mFileLength). You never
know...
The attached patch fixes the issue for me.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 05 Jan 2004 00:57:51 +0000 |
parents | e92bcf2573cb |
children | f8d5ddc7aef1 |
rev | line source |
---|---|
0 | 1 |
2 ## Makefile.am for the SDL audio library | |
3 | |
4 noinst_LTLIBRARIES = libaudio.la | |
5 | |
6 # Define which subdirectories need to be built | |
7 SUBDIRS = @AUDIO_SUBDIRS@ | |
654
e92bcf2573cb
Added audio and CD-ROM support for OSF/Tru64 (thanks Hayashi!)
Sam Lantinga <slouken@libsdl.org>
parents:
633
diff
changeset
|
8 DIST_SUBDIRS = \ |
e92bcf2573cb
Added audio and CD-ROM support for OSF/Tru64 (thanks Hayashi!)
Sam Lantinga <slouken@libsdl.org>
parents:
633
diff
changeset
|
9 alsa \ |
e92bcf2573cb
Added audio and CD-ROM support for OSF/Tru64 (thanks Hayashi!)
Sam Lantinga <slouken@libsdl.org>
parents:
633
diff
changeset
|
10 arts \ |
e92bcf2573cb
Added audio and CD-ROM support for OSF/Tru64 (thanks Hayashi!)
Sam Lantinga <slouken@libsdl.org>
parents:
633
diff
changeset
|
11 baudio \ |
e92bcf2573cb
Added audio and CD-ROM support for OSF/Tru64 (thanks Hayashi!)
Sam Lantinga <slouken@libsdl.org>
parents:
633
diff
changeset
|
12 dc \ |
e92bcf2573cb
Added audio and CD-ROM support for OSF/Tru64 (thanks Hayashi!)
Sam Lantinga <slouken@libsdl.org>
parents:
633
diff
changeset
|
13 disk \ |
e92bcf2573cb
Added audio and CD-ROM support for OSF/Tru64 (thanks Hayashi!)
Sam Lantinga <slouken@libsdl.org>
parents:
633
diff
changeset
|
14 dma \ |
e92bcf2573cb
Added audio and CD-ROM support for OSF/Tru64 (thanks Hayashi!)
Sam Lantinga <slouken@libsdl.org>
parents:
633
diff
changeset
|
15 dmedia \ |
e92bcf2573cb
Added audio and CD-ROM support for OSF/Tru64 (thanks Hayashi!)
Sam Lantinga <slouken@libsdl.org>
parents:
633
diff
changeset
|
16 dsp \ |
e92bcf2573cb
Added audio and CD-ROM support for OSF/Tru64 (thanks Hayashi!)
Sam Lantinga <slouken@libsdl.org>
parents:
633
diff
changeset
|
17 esd \ |
e92bcf2573cb
Added audio and CD-ROM support for OSF/Tru64 (thanks Hayashi!)
Sam Lantinga <slouken@libsdl.org>
parents:
633
diff
changeset
|
18 macrom \ |
e92bcf2573cb
Added audio and CD-ROM support for OSF/Tru64 (thanks Hayashi!)
Sam Lantinga <slouken@libsdl.org>
parents:
633
diff
changeset
|
19 mint \ |
e92bcf2573cb
Added audio and CD-ROM support for OSF/Tru64 (thanks Hayashi!)
Sam Lantinga <slouken@libsdl.org>
parents:
633
diff
changeset
|
20 mme \ |
e92bcf2573cb
Added audio and CD-ROM support for OSF/Tru64 (thanks Hayashi!)
Sam Lantinga <slouken@libsdl.org>
parents:
633
diff
changeset
|
21 nas \ |
e92bcf2573cb
Added audio and CD-ROM support for OSF/Tru64 (thanks Hayashi!)
Sam Lantinga <slouken@libsdl.org>
parents:
633
diff
changeset
|
22 nto \ |
e92bcf2573cb
Added audio and CD-ROM support for OSF/Tru64 (thanks Hayashi!)
Sam Lantinga <slouken@libsdl.org>
parents:
633
diff
changeset
|
23 openbsd \ |
e92bcf2573cb
Added audio and CD-ROM support for OSF/Tru64 (thanks Hayashi!)
Sam Lantinga <slouken@libsdl.org>
parents:
633
diff
changeset
|
24 paudio \ |
e92bcf2573cb
Added audio and CD-ROM support for OSF/Tru64 (thanks Hayashi!)
Sam Lantinga <slouken@libsdl.org>
parents:
633
diff
changeset
|
25 riscos \ |
e92bcf2573cb
Added audio and CD-ROM support for OSF/Tru64 (thanks Hayashi!)
Sam Lantinga <slouken@libsdl.org>
parents:
633
diff
changeset
|
26 sun \ |
e92bcf2573cb
Added audio and CD-ROM support for OSF/Tru64 (thanks Hayashi!)
Sam Lantinga <slouken@libsdl.org>
parents:
633
diff
changeset
|
27 ums \ |
e92bcf2573cb
Added audio and CD-ROM support for OSF/Tru64 (thanks Hayashi!)
Sam Lantinga <slouken@libsdl.org>
parents:
633
diff
changeset
|
28 windib \ |
e92bcf2573cb
Added audio and CD-ROM support for OSF/Tru64 (thanks Hayashi!)
Sam Lantinga <slouken@libsdl.org>
parents:
633
diff
changeset
|
29 windx5 |
0 | 30 |
31 DRIVERS = @AUDIO_DRIVERS@ | |
32 | |
33 # Include the architecture-independent sources | |
34 COMMON_SRCS = \ | |
35 SDL_audio.c \ | |
36 SDL_audio_c.h \ | |
37 SDL_audiocvt.c \ | |
38 SDL_audiodev.c \ | |
39 SDL_audiodev_c.h \ | |
40 SDL_audiomem.c \ | |
41 SDL_audiomem.h \ | |
42 SDL_mixer.c \ | |
43 SDL_sysaudio.h \ | |
44 SDL_wave.c \ | |
539
a9e38f3b8e4d
Added MMX audio mixing code for gcc (thanks Stephane!)
Sam Lantinga <slouken@libsdl.org>
parents:
509
diff
changeset
|
45 SDL_wave.h \ |
a9e38f3b8e4d
Added MMX audio mixing code for gcc (thanks Stephane!)
Sam Lantinga <slouken@libsdl.org>
parents:
509
diff
changeset
|
46 SDL_mixer_MMX.c \ |
574
64fe373be3dc
Cth converted the MMX audio mixing routines to VC++ syntax
Sam Lantinga <slouken@libsdl.org>
parents:
539
diff
changeset
|
47 SDL_mixer_MMX.h \ |
64fe373be3dc
Cth converted the MMX audio mixing routines to VC++ syntax
Sam Lantinga <slouken@libsdl.org>
parents:
539
diff
changeset
|
48 SDL_mixer_MMX_VC.c \ |
633
873c2598f969
Add m68k assembly mixing routines
Patrice Mandin <patmandin@gmail.com>
parents:
630
diff
changeset
|
49 SDL_mixer_MMX_VC.h \ |
873c2598f969
Add m68k assembly mixing routines
Patrice Mandin <patmandin@gmail.com>
parents:
630
diff
changeset
|
50 SDL_mixer_m68k.c \ |
873c2598f969
Add m68k assembly mixing routines
Patrice Mandin <patmandin@gmail.com>
parents:
630
diff
changeset
|
51 SDL_mixer_m68k.h |
0 | 52 |
53 libaudio_la_SOURCES = $(COMMON_SRCS) | |
54 libaudio_la_LIBADD = $(DRIVERS) | |
55 libaudio_la_DEPENDENCIES = $(DRIVERS) |