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

Mario Speiß git at videolan.org
Sun Jan 6 11:59:42 CET 2013


vlc | branch: master | Mario Speiß <1034-135 at online.de> | Sat Jan  5 22:59:08 2013 +0100| [e1796f3f819fd331cc5c1b8a03bd6e6b2be93f9c] | committer: Rafaël Carré

Cosmetics: DirectX now sets maximum volume without returning an error.

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

Regards,
Mario

Signed-off-by: Rafaël Carré <funman at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e1796f3f819fd331cc5c1b8a03bd6e6b2be93f9c
---

 modules/audio_output/directx.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/audio_output/directx.c b/modules/audio_output/directx.c
index bcf14e7..b0c8dc7 100644
--- 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;



More information about the vlc-commits mailing list