Changeset 2547dac3dc686fd756f2177d463b1005ec3a7684

Show
Ignore:
Timestamp:
14/11/02 15:08:01 (6 years ago)
Author:
Gildas Bazin <gbazin@videolan.org>
git-committer:
Gildas Bazin <gbazin@videolan.org> 1037282881 +0000
git-parent:

[c5817d12174ac8aa531cc2553afbf40df7761381]

git-author:
Gildas Bazin <gbazin@videolan.org> 1037282881 +0000
Message:

* src/audio_output/intf.c: fixed a bug affecting audio volume initialization.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/audio_output/intf.c

    rd1296b3 r2547dac  
    33 ***************************************************************************** 
    44 * Copyright (C) 2002 VideoLAN 
    5  * $Id: intf.c,v 1.6 2002/11/13 20:51:04 sam Exp $ 
     5 * $Id: intf.c,v 1.7 2002/11/14 14:08:01 gbazin Exp $ 
    66 * 
    77 * Authors: Christophe Massiot <massiot@via.ecp.fr> 
     
    214214void aout_VolumeSoftInit( aout_instance_t * p_aout ) 
    215215{ 
    216     audio_volume_t i_volume; 
     216    int i_volume; 
    217217 
    218218    p_aout->output.pf_volume_infos = aout_VolumeSoftInfos; 
     
    221221 
    222222    i_volume = config_GetInt( p_aout, "volume" ); 
    223     if ( i_volume == -1
     223    if ( i_volume < 0
    224224    { 
    225225        i_volume = AOUT_VOLUME_DEFAULT; 
    226226    } 
    227  
    228     aout_VolumeSoftSet( p_aout, i_volume ); 
     227    else if ( i_volume > AOUT_VOLUME_MAX ) 
     228    { 
     229        i_volume = AOUT_VOLUME_MAX; 
     230    } 
     231 
     232    aout_VolumeSoftSet( p_aout, (audio_volume_t)i_volume ); 
    229233} 
    230234