Snake Sneak
Posts: 92
Joined: Friday, 14th January 2011, 18:32
Problems running or configuring the software, commands & options, compiling, different platforms, using the interface, documentation, etc.
Snake Sneak
Posts: 92
Joined: Friday, 14th January 2011, 18:32
Dungeon Master
Posts: 4031
Joined: Thursday, 16th December 2010, 20:37
Location: France
Vaults Vanquisher
Posts: 482
Joined: Thursday, 16th December 2010, 21:08
Location: Savannah, Ga.
Blades Runner
Posts: 546
Joined: Monday, 20th December 2010, 14:25
tcjsavannah wrote:The only sound I ever hear is the groan I utter when another character bites the dust.
Dungeon Master
Posts: 182
Joined: Saturday, 18th December 2010, 10:26
Location: Germany
galehar wrote:There's no sound effect in crawl. On any platform.
sound = <regex>:<path to sound file>
Plays the sound file if a message contains regex. The regex
should not include commas or colons. For example
sound = LOW HITPOINT WARNING:sound\sounds2\danger3.wav
Getting appropriate sound files may be difficult. Check other
roguelikes or old computer RPGs. Alternatively, ask for help
in the newsgroup rec.games.roguelike.misc.
void play_sound(const char *file)
{
#if defined(WINMM_PLAY_SOUNDS)
// Check whether file exists, is readable, etc.?
if (file && *file)
sndPlaySoundW(utf8_to_16(file).c_str(), SND_ASYNC | SND_NODEFAULT);
#elif defined(SOUND_PLAY_COMMAND)
char command[255];
command[0] = 0;
if (file && *file && (strlen(file) + strlen(SOUND_PLAY_COMMAND) < 255)
&& shell_safe(file))
{
snprintf(command, sizeof command, SOUND_PLAY_COMMAND, file);
system(utf8_to_mb(command));
}
#endif
}
Users browsing this forum: No registered users and 10 guests