summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Mitchell <kevmitch@gmail.com>2015-03-27 16:48:39 -0700
committerKevin Mitchell <kevmitch@gmail.com>2015-04-04 16:31:14 -0700
commitfe60cff03bbdc0790f96365d6cf3ab8116785bb0 (patch)
tree3f0e06afdda18d4d96ef1a9e9885b25567f868d4
parent4f8493931029072092ba6995c5f95f333cbdb0e1 (diff)
downloadmpv-fe60cff03bbdc0790f96365d6cf3ab8116785bb0.tar.bz2
mpv-fe60cff03bbdc0790f96365d6cf3ab8116785bb0.tar.xz
ao/wasapi: reorder priv members
-rwxr-xr-xaudio/out/ao_wasapi.h26
1 files changed, 14 insertions, 12 deletions
diff --git a/audio/out/ao_wasapi.h b/audio/out/ao_wasapi.h
index 3ae0816a8d..eb06e46566 100755
--- a/audio/out/ao_wasapi.h
+++ b/audio/out/ao_wasapi.h
@@ -45,26 +45,18 @@ void wasapi_change_uninit(struct ao* ao);
typedef struct wasapi_state {
struct mp_log *log;
- HANDLE threadLoop;
-
/* Init phase */
HRESULT init_ret;
HANDLE init_done;
int share_mode;
- HANDLE hUninit;
-
/* volume control */
- DWORD vol_hw_support, status;
+ DWORD vol_hw_support;
float audio_volume;
float previous_volume;
float initial_volume;
- /* Buffers */
- size_t buffer_block_size; /* Size of each block in bytes */
- UINT32 bufferFrameCount; /* wasapi buffer block size, number of frames, frame size at format.nBlockAlign */
-
- /* WASAPI handles, owned by other thread */
+ /* WASAPI handles, owned by audio thread */
IMMDevice *pDevice;
IAudioClient *pAudioClient;
IAudioRenderClient *pRenderClient;
@@ -73,15 +65,19 @@ typedef struct wasapi_state {
IAudioSessionControl *pSessionControl;
IMMDeviceEnumerator *pEnumerator;
+ /* thread handles */
+ HANDLE threadLoop; /* the thread itself */
+ HANDLE hUninit; /* thread shutdown */
HANDLE hFeed; /* wasapi event */
HANDLE hResume; /* signal audio thread to resume the stream */
HANDLE hReset; /* signal audio thread to reset the stream */
+
+ /* for setting the audio thread priority */
HANDLE hTask; /* AV thread */
DWORD taskIndex; /* AV task ID */
- WAVEFORMATEXTENSIBLE format;
/* WASAPI proxy handles, for Single-Threaded Apartment communication.
- One is needed for each object that's accessed by a different thread. */
+ One is needed for each audio thread object that's accessed from the main thread. */
ISimpleAudioVolume *pAudioVolumeProxy;
IAudioEndpointVolume *pEndpointVolumeProxy;
IAudioSessionControl *pSessionControlProxy;
@@ -99,10 +95,16 @@ typedef struct wasapi_state {
atomic_ullong sample_count; /* the amount of samples per channel written to a GetBuffer buffer */
LARGE_INTEGER qpc_frequency; /* frequency of windows' high resolution timer */
+ /* ao options */
int opt_exclusive;
int opt_list;
char *opt_device;
+ /* format info */
+ WAVEFORMATEXTENSIBLE format;
+ size_t buffer_block_size; /* Size of each block in bytes */
+ UINT32 bufferFrameCount; /* wasapi buffer block size, number of frames, frame size at format.nBlockAlign */
+
/* Don't use these functions directly in case
they are unimplemented for some reason.
(XP shouldn't be an issue since it doesn't support wasapi, maybe wine?)