[vlc-commits] aout: winstore: rename vlc_FromHR to ResetInvalidatedClient

Steve Lhomme git at videolan.org
Tue Jul 7 09:10:34 CEST 2020


vlc/vlc-3.0 | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Jun 23 16:10:33 2020 +0200| [de4af3d7dc56cc25cb5e24af395a38551623b962] | committer: Steve Lhomme

aout: winstore: rename vlc_FromHR to ResetInvalidatedClient

And some more cleaning

(cherry picked from commit d0b5eb1c91d3b4a72c48beb585020d6e54581909) (rebased)

rebased:
-

Signed-off-by: Steve Lhomme <robux4 at ycbcr.xyz>

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

 modules/audio_output/winstore.c | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/modules/audio_output/winstore.c b/modules/audio_output/winstore.c
index d345673249..3d5c577e1d 100644
--- a/modules/audio_output/winstore.c
+++ b/modules/audio_output/winstore.c
@@ -1,5 +1,5 @@
 /*****************************************************************************
- * mmdevice.c : Windows Multimedia Device API audio output plugin for VLC
+ * winstore.c : Windows Multimedia Device API audio output plugin for VLC
  *****************************************************************************
  * Copyright (C) 2012 RĂ©mi Denis-Courmont
  *
@@ -25,8 +25,6 @@
 #define INITGUID
 #define COBJMACROS
 
-#include <stdlib.h>
-#include <assert.h>
 #include <audiopolicy.h>
 
 #include <vlc_common.h>
@@ -57,7 +55,7 @@ struct aout_sys_t
     IAudioClient *client;
 };
 
-static int vlc_FromHR(audio_output_t *aout, HRESULT hr)
+static void ResetInvalidatedClient(audio_output_t *aout, HRESULT hr)
 {
     aout_sys_t* sys = aout->sys;
     /* Select the default device (and restart) on unplug */
@@ -66,7 +64,6 @@ static int vlc_FromHR(audio_output_t *aout, HRESULT hr)
     {
         sys->client = NULL;
     }
-    return SUCCEEDED(hr) ? 0 : -1;
 }
 
 static int VolumeSet(audio_output_t *aout, float vol)
@@ -160,7 +157,7 @@ static void Play(audio_output_t *aout, block_t *block)
     HRESULT hr = aout_stream_Play(sys->stream, block);
     LeaveMTA();
 
-    vlc_FromHR(aout, hr);
+    ResetInvalidatedClient(aout, hr);
 }
 
 static void Pause(audio_output_t *aout, bool paused, mtime_t date)
@@ -174,7 +171,7 @@ static void Pause(audio_output_t *aout, bool paused, mtime_t date)
     LeaveMTA();
 
     (void) date;
-    vlc_FromHR(aout, hr);
+    ResetInvalidatedClient(aout, hr);
 }
 
 static void Flush(audio_output_t *aout, bool wait)
@@ -187,7 +184,7 @@ static void Flush(audio_output_t *aout, bool wait)
     HRESULT hr = aout_stream_Flush(sys->stream, wait);
     LeaveMTA();
 
-    vlc_FromHR(aout, hr);
+    ResetInvalidatedClient(aout, hr);
 }
 
 static HRESULT ActivateDevice(void *opaque, REFIID iid, PROPVARIANT *actparms,



More information about the vlc-commits mailing list