ma_node_graph nodeGraph; /* An engine is a node graph. It should be able to be plugged into any ma_node_graph API (with a cast) which means this must be the first member of this struct. */
ma_node_graph nodeGraph; /* An engine is a node graph. It should be able to be plugged into any ma_node_graph API (with a cast) which means this must be the first member of this struct. */
#if !defined(MA_NO_RESOURCE_MANAGER)
#if !defined(MA_NO_RESOURCE_MANAGER)
ma_resource_manager* pResourceManager;
ma_resource_manager* pResourceManager;
#endif
#endif
#if !defined(MA_NO_DEVICE_IO)
#if !defined(MA_NO_DEVICE_IO)
ma_device* pDevice; /* Optionally set via the config, otherwise allocated by the engine in ma_engine_init(). */
ma_device* pDevice; /* Optionally set via the config, otherwise allocated by the engine in ma_engine_init(). */
#endif
#endif
ma_log* pLog;
ma_log* pLog;
ma_uint32 sampleRate;
ma_uint32 sampleRate;
...
@@ -11225,10 +11225,10 @@ struct ma_engine
...
@@ -11225,10 +11225,10 @@ struct ma_engine
ma_allocation_callbacks allocationCallbacks;
ma_allocation_callbacks allocationCallbacks;
ma_bool8 ownsResourceManager;
ma_bool8 ownsResourceManager;
ma_bool8 ownsDevice;
ma_bool8 ownsDevice;
ma_spinlock inlinedSoundLock; /* For synchronizing access so the inlined sound list. */
ma_spinlock inlinedSoundLock; /* For synchronizing access so the inlined sound list. */
ma_sound_inlined* pInlinedSoundHead; /* The first inlined sound. Inlined sounds are tracked in a linked list. */
ma_sound_inlined* pInlinedSoundHead; /* The first inlined sound. Inlined sounds are tracked in a linked list. */
MA_ATOMIC(4, ma_uint32) inlinedSoundCount; /* The total number of allocated inlined sound objects. Used for debugging. */
MA_ATOMIC(4, ma_uint32) inlinedSoundCount; /* The total number of allocated inlined sound objects. Used for debugging. */
ma_uint32 gainSmoothTimeInFrames; /* The number of frames to interpolate the gain of spatialized sounds across. */
ma_uint32 gainSmoothTimeInFrames; /* The number of frames to interpolate the gain of spatialized sounds across. */
ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[DirectSound] IDirectSoundBuffer_Play() failed after attempting to resume from state %d.", (int)playbackBufferStatus);
return ma_result_from_HRESULT(hr);
}
isPlaybackDeviceStarted = MA_TRUE;
ma_sleep(waitTimeInMilliseconds);
continue;
}
if (physicalPlayCursorInBytes < prevPlayCursorInBytesPlayback) {
if (physicalPlayCursorInBytes < prevPlayCursorInBytesPlayback) {