[vlc-commits] aout: winstore: rename vlc_FromHR to ResetInvalidatedClient
Steve Lhomme
git at videolan.org
Mon Jul 6 13:36:20 CEST 2020
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Jun 23 16:10:33 2020 +0200| [d0b5eb1c91d3b4a72c48beb585020d6e54581909] | committer: Steve Lhomme
aout: winstore: rename vlc_FromHR to ResetInvalidatedClient
And some more cleaning
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d0b5eb1c91d3b4a72c48beb585020d6e54581909
---
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 9fcd6768e0..ac225fd84c 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 @@ typedef struct
IAudioClient *client;
} aout_sys_t;
-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, vlc_tick_t date)
HRESULT hr = aout_stream_Play(sys->stream, block, date);
LeaveMTA();
- vlc_FromHR(aout, hr);
+ ResetInvalidatedClient(aout, hr);
(void) date;
}
@@ -175,7 +172,7 @@ static void Pause(audio_output_t *aout, bool paused, vlc_tick_t date)
LeaveMTA();
(void) date;
- vlc_FromHR(aout, hr);
+ ResetInvalidatedClient(aout, hr);
}
static void Flush(audio_output_t *aout)
@@ -188,7 +185,7 @@ static void Flush(audio_output_t *aout)
HRESULT hr = aout_stream_Flush(sys->stream);
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