/* sound.c -- sound support.
Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007 Free Software Foundation, Inc.
+ 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
This file is part of GNU Emacs.
{
if (snd_mixer_selem_has_playback_volume (e))
{
- long pmin, pmax;
+ long pmin, pmax, vol;
snd_mixer_selem_get_playback_volume_range (e, &pmin, &pmax);
- long vol = pmin + (sd->volume * (pmax - pmin)) / 100;
+ vol = pmin + (sd->volume * (pmax - pmin)) / 100;
for (chn = 0; chn <= SND_MIXER_SCHN_LAST; chn++)
snd_mixer_selem_set_playback_volume (e, chn, vol);