[vlc-devel] [PATCH] Cosmetics: DirectX now sets maximum volume without returning an error.

Mario Speiß 1034-135 at online.de
Sat Jan 5 22:59:08 CET 2013


Before it returned -1 when volume was set to 100% so OSD never showed the
'Volume: 100%' message.

Regards,
Mario
---
 modules/audio_output/directx.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules/audio_output/directx.c b/modules/audio_output/directx.c
index bcf14e7..b0c8dc7
--- a/modules/audio_output/directx.c
+++ b/modules/audio_output/directx.c
@@ -537,7 +537,7 @@ static int VolumeSet( audio_output_t *p_aout, float vol )
 
     /* Clamp to allowed DirectSound range */
     static_assert( DSBVOLUME_MIN < DSBVOLUME_MAX, "DSBVOLUME_* confused" );
-    if( mb >= DSBVOLUME_MAX )
+    if( mb > DSBVOLUME_MAX )
     {
         mb = DSBVOLUME_MAX;
         ret = -1;
-- 
1.7.5.4




More information about the vlc-devel mailing list