- if (Mix_PlayChannel(DOZER_CHANNEL, rumble, 4) == -1) {
- printf("Mix_PlayChannel: %s\n", Mix_GetError());
- return;
+ Mix_HaltChannel(DOZER_CHANNEL);
+}
+
+#else /* WITH_SDL_MIXER */
+InitializeSound()
+{
+ SoundInitialized = 1;
+}
+
+ShutDownSound()
+{
+ SoundInitialized = 0;
+}
+
+MakeSound(char *channel, char *id)
+{
+ char filename[256], player[256];
+ int i;
+ pid_t pid;
+
+ if (!UserSoundOn) return;
+ if (!SoundInitialized) return;
+
+ for (i = 0; i < SIM_NSOUNDS; i++) {
+ if (!strcmp(sounds[i].id, id))
+ break;
+ }
+
+ snprintf(filename, sizeof(filename), "%s/sounds/%s", ResourceDir,
+ sounds[i].file);
+
+ snprintf(player, sizeof(player), "%s/sounds/player", ResourceDir);
+
+ pid = fork();
+
+ switch(pid) {
+ case 0:
+ execl(player, player, filename, NULL);
+ break;
+ case -1:
+ perror("fork failed");
+ break;
+ default:
+ break;