mirror of https://github.com/mpv-player/mpv
Replace numeric constants by their defines.
Fixes icc warning #188: enumerated type mixed with another type git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27738 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
3035850d27
commit
22bb046adc
|
@ -192,7 +192,7 @@ static int control(int cmd, void *arg)
|
||||||
set_vol = vol->left / f_multi + pmin + 0.5;
|
set_vol = vol->left / f_multi + pmin + 0.5;
|
||||||
|
|
||||||
//setting channels
|
//setting channels
|
||||||
if ((err = snd_mixer_selem_set_playback_volume(elem, 0, set_vol)) < 0) {
|
if ((err = snd_mixer_selem_set_playback_volume(elem, SND_MIXER_SCHN_FRONT_LEFT, set_vol)) < 0) {
|
||||||
mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_ErrorSettingLeftChannel,
|
mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_ErrorSettingLeftChannel,
|
||||||
snd_strerror(err));
|
snd_strerror(err));
|
||||||
return CONTROL_ERROR;
|
return CONTROL_ERROR;
|
||||||
|
@ -201,7 +201,7 @@ static int control(int cmd, void *arg)
|
||||||
|
|
||||||
set_vol = vol->right / f_multi + pmin + 0.5;
|
set_vol = vol->right / f_multi + pmin + 0.5;
|
||||||
|
|
||||||
if ((err = snd_mixer_selem_set_playback_volume(elem, 1, set_vol)) < 0) {
|
if ((err = snd_mixer_selem_set_playback_volume(elem, SND_MIXER_SCHN_FRONT_RIGHT, set_vol)) < 0) {
|
||||||
mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_ErrorSettingRightChannel,
|
mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_ErrorSettingRightChannel,
|
||||||
snd_strerror(err));
|
snd_strerror(err));
|
||||||
return CONTROL_ERROR;
|
return CONTROL_ERROR;
|
||||||
|
@ -221,9 +221,9 @@ static int control(int cmd, void *arg)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
snd_mixer_selem_get_playback_volume(elem, 0, &get_vol);
|
snd_mixer_selem_get_playback_volume(elem, SND_MIXER_SCHN_FRONT_LEFT, &get_vol);
|
||||||
vol->left = (get_vol - pmin) * f_multi;
|
vol->left = (get_vol - pmin) * f_multi;
|
||||||
snd_mixer_selem_get_playback_volume(elem, 1, &get_vol);
|
snd_mixer_selem_get_playback_volume(elem, SND_MIXER_SCHN_FRONT_RIGHT, &get_vol);
|
||||||
vol->right = (get_vol - pmin) * f_multi;
|
vol->right = (get_vol - pmin) * f_multi;
|
||||||
|
|
||||||
mp_msg(MSGT_AO,MSGL_DBG2,"left=%f, right=%f\n",vol->left,vol->right);
|
mp_msg(MSGT_AO,MSGL_DBG2,"left=%f, right=%f\n",vol->left,vol->right);
|
||||||
|
|
|
@ -1120,7 +1120,7 @@ static void check_events (void)
|
||||||
{
|
{
|
||||||
struct sdl_priv_s *priv = &sdl_priv;
|
struct sdl_priv_s *priv = &sdl_priv;
|
||||||
SDL_Event event;
|
SDL_Event event;
|
||||||
SDLKey keypressed = 0;
|
SDLKey keypressed = SDLK_UNKNOWN;
|
||||||
|
|
||||||
/* Poll the waiting SDL Events */
|
/* Poll the waiting SDL Events */
|
||||||
while ( SDL_PollEvent(&event) ) {
|
while ( SDL_PollEvent(&event) ) {
|
||||||
|
|
Loading…
Reference in New Issue