[vlc-devel] [PATCH v2 1/4] aout: winstore: rename vlc_FromHR to ResetInvalidatedClient
Steve Lhomme
robux4 at ycbcr.xyz
Fri Jun 26 11:34:48 CEST 2020
And some more cleaning
---
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 9fcd6768e01..ac225fd84c8 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,
--
2.26.2
More information about the vlc-devel
mailing list