volatilema_uint32encodedReadOffset;/* Most significant bit is the loop flag. Lower 31 bits contains the actual offset in bytes. */
volatilema_uint32encodedReadOffset;/* Most significant bit is the loop flag. Lower 31 bits contains the actual offset in bytes. */
volatilema_uint32encodedWriteOffset;/* Most significant bit is the loop flag. Lower 31 bits contains the actual offset in bytes. */
volatilema_uint32encodedWriteOffset;/* Most significant bit is the loop flag. Lower 31 bits contains the actual offset in bytes. */
ma_bool32ownsBuffer:1;/* Used to know whether or not miniaudio is responsible for free()-ing the buffer. */
ma_bool8ownsBuffer;/* Used to know whether or not miniaudio is responsible for free()-ing the buffer. */
ma_bool32clearOnWriteAcquire:1;/* When set, clears the acquired write buffer before returning from ma_rb_acquire_write(). */
ma_bool8clearOnWriteAcquire;/* When set, clears the acquired write buffer before returning from ma_rb_acquire_write(). */
ma_allocation_callbacksallocationCallbacks;
ma_allocation_callbacksallocationCallbacks;
}ma_rb;
}ma_rb;
...
@@ -1841,8 +1843,8 @@ struct ma_device_config
...
@@ -1841,8 +1843,8 @@ struct ma_device_config
ma_uint32periodSizeInMilliseconds;
ma_uint32periodSizeInMilliseconds;
ma_uint32periods;
ma_uint32periods;
ma_performance_profileperformanceProfile;
ma_performance_profileperformanceProfile;
ma_bool32noPreZeroedOutputBuffer;/* When set to true, the contents of the output buffer passed into the data callback will be left undefined rather than initialized to zero. */
ma_bool8noPreZeroedOutputBuffer;/* When set to true, the contents of the output buffer passed into the data callback will be left undefined rather than initialized to zero. */
ma_bool32noClip;/* When set to true, the contents of the output buffer passed into the data callback will be clipped after returning. Only applies when the playback sample format is f32. */
ma_bool8noClip;/* When set to true, the contents of the output buffer passed into the data callback will be clipped after returning. Only applies when the playback sample format is f32. */
ma_device_callback_procdataCallback;
ma_device_callback_procdataCallback;
ma_stop_procstopCallback;
ma_stop_procstopCallback;
void*pUserData;
void*pUserData;
...
@@ -1877,10 +1879,10 @@ struct ma_device_config
...
@@ -1877,10 +1879,10 @@ struct ma_device_config
struct
struct
{
{
ma_bool32noAutoConvertSRC;/* When set to true, disables the use of AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM. */
ma_bool8noAutoConvertSRC;/* When set to true, disables the use of AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM. */
ma_bool32noDefaultQualitySRC;/* When set to true, disables the use of AUDCLNT_STREAMFLAGS_SRC_DEFAULT_QUALITY. */
ma_bool8noDefaultQualitySRC;/* When set to true, disables the use of AUDCLNT_STREAMFLAGS_SRC_DEFAULT_QUALITY. */
ma_device_info*pDeviceInfos;/* Playback devices first, then capture. */
ma_device_info*pDeviceInfos;/* Playback devices first, then capture. */
ma_bool32isBackendAsynchronous:1;/* Set when the context is initialized. Set to 1 for asynchronous backends such as Core Audio and JACK. Do not modify. */
ma_bool8isBackendAsynchronous;/* Set when the context is initialized. Set to 1 for asynchronous backends such as Core Audio and JACK. Do not modify. */
ma_result(*onUninit)(ma_context*pContext);
ma_result(*onUninit)(ma_context*pContext);
ma_result(*onEnumDevices)(ma_context*pContext,ma_enum_devices_callback_proccallback,void*pUserData);/* Return false from the callback to stop enumeration. */
ma_result(*onEnumDevices)(ma_context*pContext,ma_enum_devices_callback_proccallback,void*pUserData);/* Return false from the callback to stop enumeration. */
...
@@ -2481,12 +2483,12 @@ struct ma_device
...
@@ -2481,12 +2483,12 @@ struct ma_device
ma_eventstopEvent;
ma_eventstopEvent;
ma_threadthread;
ma_threadthread;
ma_resultworkResult;/* This is set by the worker thread after it's finished doing a job. */
ma_resultworkResult;/* This is set by the worker thread after it's finished doing a job. */
ma_bool32usingDefaultSampleRate:1;
ma_bool8usingDefaultSampleRate;
ma_bool32usingDefaultBufferSize:1;
ma_bool8usingDefaultBufferSize;
ma_bool32usingDefaultPeriods:1;
ma_bool8usingDefaultPeriods;
ma_bool32isOwnerOfContext:1;/* When set to true, uninitializing the device will also uninitialize the context. Set to true when NULL is passed into ma_device_init(). */
ma_bool8isOwnerOfContext;/* When set to true, uninitializing the device will also uninitialize the context. Set to true when NULL is passed into ma_device_init(). */
ma_bool32noPreZeroedOutputBuffer:1;
ma_bool8noPreZeroedOutputBuffer;
ma_bool32noClip:1;
ma_bool8noClip;
volatilefloatmasterVolumeFactor;/* Volatile so we can use some thread safety when applying volume to periods. */
volatilefloatmasterVolumeFactor;/* Volatile so we can use some thread safety when applying volume to periods. */
ma_duplex_rbduplexRB;/* Intermediary buffer for duplex device on asynchronous backends. */
ma_duplex_rbduplexRB;/* Intermediary buffer for duplex device on asynchronous backends. */
struct
struct
...
@@ -2506,9 +2508,6 @@ struct ma_device
...
@@ -2506,9 +2508,6 @@ struct ma_device
ma_device_idid;/* If using an explicit device, will be set to a copy of the ID used for initialization. Otherwise cleared to 0. */
ma_device_idid;/* If using an explicit device, will be set to a copy of the ID used for initialization. Otherwise cleared to 0. */
charname[256];/* Maybe temporary. Likely to be replaced with a query API. */
charname[256];/* Maybe temporary. Likely to be replaced with a query API. */
ma_share_modeshareMode;/* Set to whatever was passed in when the device was initialized. */
ma_share_modeshareMode;/* Set to whatever was passed in when the device was initialized. */
ma_bool32usingDefaultFormat:1;
ma_bool32usingDefaultChannels:1;
ma_bool32usingDefaultChannelMap:1;
ma_formatformat;
ma_formatformat;
ma_uint32channels;
ma_uint32channels;
ma_channelchannelMap[MA_MAX_CHANNELS];
ma_channelchannelMap[MA_MAX_CHANNELS];
...
@@ -2519,15 +2518,15 @@ struct ma_device
...
@@ -2519,15 +2518,15 @@ struct ma_device
ma_uint32internalPeriodSizeInFrames;
ma_uint32internalPeriodSizeInFrames;
ma_uint32internalPeriods;
ma_uint32internalPeriods;
ma_data_converterconverter;
ma_data_converterconverter;
ma_bool8usingDefaultFormat;
ma_bool8usingDefaultChannels;
ma_bool8usingDefaultChannelMap;
}playback;
}playback;
struct
struct
{
{
ma_device_idid;/* If using an explicit device, will be set to a copy of the ID used for initialization. Otherwise cleared to 0. */
ma_device_idid;/* If using an explicit device, will be set to a copy of the ID used for initialization. Otherwise cleared to 0. */
charname[256];/* Maybe temporary. Likely to be replaced with a query API. */
charname[256];/* Maybe temporary. Likely to be replaced with a query API. */
ma_share_modeshareMode;/* Set to whatever was passed in when the device was initialized. */
ma_share_modeshareMode;/* Set to whatever was passed in when the device was initialized. */
ma_bool32usingDefaultFormat:1;
ma_bool32usingDefaultChannels:1;
ma_bool32usingDefaultChannelMap:1;
ma_formatformat;
ma_formatformat;
ma_uint32channels;
ma_uint32channels;
ma_channelchannelMap[MA_MAX_CHANNELS];
ma_channelchannelMap[MA_MAX_CHANNELS];
...
@@ -2538,6 +2537,9 @@ struct ma_device
...
@@ -2538,6 +2537,9 @@ struct ma_device
ma_uint32internalPeriodSizeInFrames;
ma_uint32internalPeriodSizeInFrames;
ma_uint32internalPeriods;
ma_uint32internalPeriods;
ma_data_converterconverter;
ma_data_converterconverter;
ma_bool8usingDefaultFormat;
ma_bool8usingDefaultChannels;
ma_bool8usingDefaultChannelMap;
}capture;
}capture;
union
union
...
@@ -2558,17 +2560,18 @@ struct ma_device
...
@@ -2558,17 +2560,18 @@ struct ma_device
ma_uint32originalPeriodSizeInFrames;
ma_uint32originalPeriodSizeInFrames;
ma_uint32originalPeriodSizeInMilliseconds;
ma_uint32originalPeriodSizeInMilliseconds;
ma_uint32originalPeriods;
ma_uint32originalPeriods;
ma_performance_profileoriginalPerformanceProfile;
ma_bool32hasDefaultPlaybackDeviceChanged;/* <-- Make sure this is always a whole 32-bits because we use atomic assignments. */
ma_bool32hasDefaultPlaybackDeviceChanged;/* <-- Make sure this is always a whole 32-bits because we use atomic assignments. */
ma_bool32hasDefaultCaptureDeviceChanged;/* <-- Make sure this is always a whole 32-bits because we use atomic assignments. */
ma_bool32hasDefaultCaptureDeviceChanged;/* <-- Make sure this is always a whole 32-bits because we use atomic assignments. */
ma_uint32periodSizeInFramesPlayback;
ma_uint32periodSizeInFramesPlayback;
ma_uint32periodSizeInFramesCapture;
ma_uint32periodSizeInFramesCapture;
ma_bool32isStartedCapture;/* <-- Make sure this is always a whole 32-bits because we use atomic assignments. */
ma_bool32isStartedCapture;/* <-- Make sure this is always a whole 32-bits because we use atomic assignments. */
ma_bool32isStartedPlayback;/* <-- Make sure this is always a whole 32-bits because we use atomic assignments. */
ma_bool32isStartedPlayback;/* <-- Make sure this is always a whole 32-bits because we use atomic assignments. */
ma_bool32noAutoConvertSRC:1;/* When set to true, disables the use of AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM. */
ma_bool8noAutoConvertSRC;/* When set to true, disables the use of AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM. */
ma_bool32noDefaultQualitySRC:1;/* When set to true, disables the use of AUDCLNT_STREAMFLAGS_SRC_DEFAULT_QUALITY. */
ma_bool8noDefaultQualitySRC;/* When set to true, disables the use of AUDCLNT_STREAMFLAGS_SRC_DEFAULT_QUALITY. */