Skip to content

Commit

Permalink
Added an audio driver that writes to disk (thanks Ryan!)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Lantinga committed Jun 16, 2001
1 parent 8ca59e0 commit 0070d29
Show file tree
Hide file tree
Showing 9 changed files with 321 additions and 3 deletions.
32 changes: 32 additions & 0 deletions configure.in
Expand Up @@ -368,6 +368,21 @@ CheckNAS()
fi
}


dnl rcg07142001 See if the user wants the disk writer audio driver...
CheckDiskAudio()
{
AC_ARG_ENABLE(diskaudio,
[ --enable-diskaudio support the disk writer audio driver [default=no]],
, enable_diskaudio=no)
if test x$enable_audio = xyes -a x$enable_diskaudio = xyes; then
CFLAGS="$CFLAGS -DDISKAUD_SUPPORT"
AUDIO_SUBDIRS="$AUDIO_SUBDIRS disk"
AUDIO_DRIVERS="$AUDIO_DRIVERS disk/libaudio_disk.la"
fi
}


dnl See if we can use x86 assembly blitters
CheckNASM()
{
Expand Down Expand Up @@ -1085,6 +1100,7 @@ case "$target" in
*-*-linux*)
ARCH=linux
CheckDummyVideo
CheckDiskAudio
CheckNASM
CheckOSS
CheckALSA
Expand Down Expand Up @@ -1151,6 +1167,7 @@ case "$target" in
*-*-bsdi*)
ARCH=bsdi
CheckDummyVideo
CheckDiskAudio
CheckNASM
CheckOSS
CheckARTSC
Expand Down Expand Up @@ -1194,6 +1211,7 @@ case "$target" in
*-*-freebsd*)
ARCH=freebsd
CheckDummyVideo
CheckDiskAudio
CheckNASM
CheckOSS
CheckARTSC
Expand Down Expand Up @@ -1246,6 +1264,7 @@ case "$target" in
*-*-netbsd*)
ARCH=netbsd
CheckDummyVideo
CheckDiskAudio
CheckNASM
CheckOSS
CheckARTSC
Expand Down Expand Up @@ -1297,6 +1316,7 @@ case "$target" in
*-*-openbsd*)
ARCH=openbsd
CheckDummyVideo
CheckDiskAudio
CheckNASM
CheckOSS
CheckARTSC
Expand Down Expand Up @@ -1345,6 +1365,7 @@ case "$target" in
*-*-sysv5*)
ARCH=sysv5
CheckDummyVideo
CheckDiskAudio
CheckNASM
CheckOSS
CheckARTSC
Expand Down Expand Up @@ -1392,6 +1413,7 @@ case "$target" in
ARCH=solaris
CFLAGS="$CFLAGS -D__ELF__" # Fix for nasm on Solaris x86
CheckDummyVideo
CheckDiskAudio
CheckNASM
CheckOSS
CheckARTSC
Expand Down Expand Up @@ -1438,6 +1460,7 @@ case "$target" in
*-*-irix*)
ARCH=irix
CheckDummyVideo
CheckDiskAudio
CheckNAS
CheckX11
CheckAAlib
Expand Down Expand Up @@ -1496,6 +1519,7 @@ case "$target" in
*-*-hpux*)
ARCH=hpux
CheckDummyVideo
CheckDiskAudio
CheckOSS
CheckNAS
CheckX11
Expand Down Expand Up @@ -1540,6 +1564,7 @@ case "$target" in
*-*-aix*)
ARCH=aix
CheckDummyVideo
CheckDiskAudio
CheckOSS
CheckNAS
CheckX11
Expand Down Expand Up @@ -1583,6 +1608,7 @@ case "$target" in
*-*-osf*)
ARCH=osf
CheckDummyVideo
CheckDiskAudio
CheckNAS
CheckX11
CheckGGI
Expand Down Expand Up @@ -1626,6 +1652,7 @@ case "$target" in
*-*-qnx*)
ARCH=qnx
CheckDummyVideo
CheckDiskAudio
CheckNAS
CheckPHOTON
CheckX11
Expand Down Expand Up @@ -1680,6 +1707,7 @@ case "$target" in
fi
fi
CheckDummyVideo
CheckDiskAudio
CheckWIN32
CheckDIRECTX
CheckNASM
Expand Down Expand Up @@ -1736,6 +1764,7 @@ case "$target" in
ARCH=beos
ac_default_prefix=/boot/develop/tools/gnupro
CheckDummyVideo
CheckDiskAudio
CheckNASM
CheckBWINDOW
CheckBeGL
Expand Down Expand Up @@ -1781,6 +1810,7 @@ case "$target" in
# for which this case would be handy.
ARCH=macos
CheckDummyVideo
CheckDiskAudio
CheckTOOLBOX
CheckMacGL
# Set up files for the main() stub
Expand Down Expand Up @@ -1824,6 +1854,7 @@ case "$target" in
# config.guess comes back with "darwin", so go with the flow.
ARCH=macos
CheckDummyVideo
CheckDiskAudio
CheckCARBON
CheckMacGL
CheckPTHREAD
Expand Down Expand Up @@ -1973,6 +2004,7 @@ src/audio/sun/Makefile
src/audio/ums/Makefile
src/audio/windib/Makefile
src/audio/windx5/Makefile
src/audio/disk/Makefile
src/video/Makefile
src/video/cybergfx/Makefile
src/video/x11/Makefile
Expand Down
1 change: 1 addition & 0 deletions docs.html
Expand Up @@ -16,6 +16,7 @@ <H2>
Major changes since SDL 1.0.0:
</H2>
<UL>
<LI> 1.2.1: Added an audio driver that writes to disk (thanks Ryan!)
<LI> 1.2.1: Mouse wheel sends mouse button (4/5) events on Windows
<LI> 1.2.1: Added MacOS X Project Builder projects (thanks Darrell!)
<LI> 1.2.1: Added initial support for Quartz video (thanks Darrell!)
Expand Down
3 changes: 1 addition & 2 deletions src/audio/Makefile.am
Expand Up @@ -5,8 +5,7 @@ noinst_LTLIBRARIES = libaudio.la

# Define which subdirectories need to be built
SUBDIRS = @AUDIO_SUBDIRS@
DIST_SUBDIRS = alsa arts baudio dma dmedia dsp esd macrom nas nto \
openbsd paudio sun ums windib windx5
DIST_SUBDIRS = alsa arts baudio dma dmedia dsp esd macrom nas nto openbsd paudio sun ums windib windx5 disk

DRIVERS = @AUDIO_DRIVERS@

Expand Down
4 changes: 3 additions & 1 deletion src/audio/SDL_audio.c
Expand Up @@ -81,7 +81,9 @@ static AudioBootStrap *bootstrap[] = {
#ifdef ENABLE_AHI
&AHI_bootstrap,
#endif

#ifdef DISKAUD_SUPPORT
&DISKAUD_bootstrap,
#endif
NULL
};
SDL_AudioDevice *current_audio = NULL;
Expand Down
3 changes: 3 additions & 0 deletions src/audio/SDL_sysaudio.h
Expand Up @@ -140,6 +140,9 @@ extern AudioBootStrap SNDMGR_bootstrap;
#ifdef ENABLE_AHI
extern AudioBootStrap AHI_bootstrap;
#endif
#ifdef DISKAUD_SUPPORT
extern AudioBootStrap DISKAUD_bootstrap;
#endif

/* This is the current audio device */
extern SDL_AudioDevice *current_audio;
Expand Down
6 changes: 6 additions & 0 deletions src/audio/disk/.cvsignore
@@ -0,0 +1,6 @@
Makefile.in
Makefile
.libs
*.o
*.lo
*.la
9 changes: 9 additions & 0 deletions src/audio/disk/Makefile.am
@@ -0,0 +1,9 @@

## Makefile.am for SDL audio "driver" that writes to a file.

noinst_LTLIBRARIES = libaudio_disk.la
libaudio_disk_la_SOURCES = $(SRCS)

# The SDL audio driver sources
SRCS = SDL_diskaudio.c \
SDL_diskaudio.h

0 comments on commit 0070d29

Please sign in to comment.