Added (play-file).
This commit is contained in:
parent
9fb7a6526c
commit
cd2afafddc
1 changed files with 28 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue