/[enigma]/enigma/sound.cc
ViewVC logotype

Diff of /enigma/sound.cc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.11 by dheck, Sun Dec 15 16:21:34 2002 UTC revision 1.12 by dheck, Mon Dec 16 20:46:44 2002 UTC
# Line 108  sound::PlaySound(const char *name) Line 108  sound::PlaySound(const char *name)
108      if (!sound_enabled)      if (!sound_enabled)
109          return;          return;
110      if (Mix_Chunk *ch = cache_sound(name)) {      if (Mix_Chunk *ch = cache_sound(name)) {
111          Mix_PlayChannel(-1, ch, 0);          int channel = Mix_PlayChannel(-1, ch, 0);
112            int soundvol = int(options::SoundVolume * MIX_MAX_VOLUME);
113            Mix_Volume(channel, Max(0, Min(soundvol, MIX_MAX_VOLUME)));
114      }      }
115  }  }
116    
# Line 144  sound::PlayMusic(const char *name) Line 146  sound::PlayMusic(const char *name)
146      current_music = Mix_LoadMUS(fname.c_str());      current_music = Mix_LoadMUS(fname.c_str());
147      if (current_music) {      if (current_music) {
148          Mix_PlayMusic(current_music,-1);          Mix_PlayMusic(current_music,-1);
149            UpdateVolume();
150          current_music_name = name;          current_music_name = name;
151      }      }
152      else      else

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26