[vlc-commits] winstore: Try to reuse a previous IAudioClient when possible
Hugo Beauzée-Luyssen
git at videolan.org
Tue Sep 27 18:29:50 CEST 2016
vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Tue Sep 27 18:29:11 2016 +0200| [0f9a2655997f9684b58391438e65a031f574dfe9] | committer: Hugo Beauzée-Luyssen
winstore: Try to reuse a previous IAudioClient when possible
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0f9a2655997f9684b58391438e65a031f574dfe9
---
modules/audio_output/winstore.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/modules/audio_output/winstore.c b/modules/audio_output/winstore.c
index feb13d9..0eb8d93 100644
--- a/modules/audio_output/winstore.c
+++ b/modules/audio_output/winstore.c
@@ -278,6 +278,7 @@ static int DeviceSelect(audio_output_t *aout, const char* psz_device)
if (aout->sys->client == (IAudioClient*)ptr)
return VLC_SUCCESS;
aout->sys->client = (IAudioClient*)ptr;
+ var_SetAddress( aout->obj.parent, "winstore-client", aout->sys->client );
aout_RestartRequest( aout, AOUT_RESTART_OUTPUT );
return VLC_SUCCESS;
}
@@ -292,7 +293,9 @@ static int Open(vlc_object_t *obj)
aout->sys = sys;
sys->stream = NULL;
- sys->client = NULL;
+ aout->sys->client = var_CreateGetAddress( aout->obj.parent, "winstore-client" );
+ if (aout->sys->client != NULL)
+ msg_Dbg( aout, "Reusing previous client: %p", aout->sys->client );
aout->start = Start;
aout->stop = Stop;
aout->time_get = TimeGet;
More information about the vlc-commits
mailing list