From cd2afafddc89ab72604562aaa79863af1e2baa28 Mon Sep 17 00:00:00 2001
From: johns <>
Date: Tue, 25 Jun 2002 00:43:59 +0000
Subject: [PATCH] Added (play-file).

---
 src/sound/script_sound.cpp | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/src/sound/script_sound.cpp b/src/sound/script_sound.cpp
index d382c107f..8abf94798 100644
--- a/src/sound/script_sound.cpp
+++ b/src/sound/script_sound.cpp
@@ -447,6 +447,22 @@ local SCM CclPlayMusic(SCM name)
     return SCM_UNSPECIFIED;
 }
 
+/**
+**	Play a sound file.
+**
+**	@param name	Name of the sound file to play.
+*/
+local SCM CclPlayFile(SCM name)
+{
+    char* filename;
+
+    filename=gh_scm2newstr(name,NULL);
+    PlayFile(filename);
+    free(filename);
+
+    return SCM_UNSPECIFIED;
+}
+
 /**
 **	Stop playing music.
 */
@@ -482,6 +498,7 @@ global void SoundCclRegister(void)
     init_subr_1("play-sound",CclPlaySound);
 
     gh_new_procedure1_0("play-music",CclPlayMusic);
+    gh_new_procedure1_0("play-file",CclPlayFile);
     gh_new_procedure0_0("stop-music",CclStopMusic);
 }
 
@@ -613,6 +630,16 @@ local SCM CclPlayMusic(SCM name __attribute__((unused)))
     return SCM_UNSPECIFIED;
 }
 
+/**
+**	Play a sound file.
+**
+**	@param name	Name of the sound file to play.
+*/
+local SCM CclPlayFile(SCM name __attribute__((unused)))
+{
+    return SCM_UNSPECIFIED;
+}
+
 /**
 **	Register CCL features for sound. Dummy version.
 */
@@ -632,6 +659,7 @@ global void SoundCclRegister(void)
     gh_new_procedure2_0("set-sound-range!",CclSetSoundRange);
 
     gh_new_procedure1_0("play-music",CclPlayMusic);
+    gh_new_procedure1_0("play-file",CclPlayFile);
 }
 
 #endif	// } !WITH_SOUND