mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-23 08:44:04 +02:00
Remove an unnecessary atomic.
This commit is contained in:
+2
-2
@@ -10448,7 +10448,7 @@ struct ma_node_output_bus
|
|||||||
ma_uint8 channels; /* The number of channels in the audio stream for this bus. */
|
ma_uint8 channels; /* The number of channels in the audio stream for this bus. */
|
||||||
|
|
||||||
/* Mutable via multiple threads. Must be used atomically. The weird ordering here is for packing reasons. */
|
/* Mutable via multiple threads. Must be used atomically. The weird ordering here is for packing reasons. */
|
||||||
MA_ATOMIC(1, ma_uint8) inputNodeInputBusIndex; /* The index of the input bus on the input. Required for detaching. */
|
ma_uint8 inputNodeInputBusIndex; /* The index of the input bus on the input. Required for detaching. Will only be used within the spinlock so does not need to be atomic. */
|
||||||
MA_ATOMIC(4, ma_uint32) flags; /* Some state flags for tracking the read state of the output buffer. A combination of MA_NODE_OUTPUT_BUS_FLAG_*. */
|
MA_ATOMIC(4, ma_uint32) flags; /* Some state flags for tracking the read state of the output buffer. A combination of MA_NODE_OUTPUT_BUS_FLAG_*. */
|
||||||
MA_ATOMIC(4, ma_uint32) refCount; /* Reference count for some thread-safety when detaching. */
|
MA_ATOMIC(4, ma_uint32) refCount; /* Reference count for some thread-safety when detaching. */
|
||||||
MA_ATOMIC(4, ma_bool32) isAttached; /* This is used to prevent iteration of nodes that are in the middle of being detached. Used for thread safety. */
|
MA_ATOMIC(4, ma_bool32) isAttached; /* This is used to prevent iteration of nodes that are in the middle of being detached. Used for thread safety. */
|
||||||
@@ -69551,7 +69551,7 @@ static void ma_node_input_bus_attach(ma_node_input_bus* pInputBus, ma_node_outpu
|
|||||||
old input bus has been updated so that pOutputBus will not get iterated again.
|
old input bus has been updated so that pOutputBus will not get iterated again.
|
||||||
*/
|
*/
|
||||||
pOutputBus->pInputNode = pNewInputNode; /* No need for an atomic assignment here because modification of this variable always happens within a lock. */
|
pOutputBus->pInputNode = pNewInputNode; /* No need for an atomic assignment here because modification of this variable always happens within a lock. */
|
||||||
pOutputBus->inputNodeInputBusIndex = (ma_uint8)inputNodeInputBusIndex; /* As above. */
|
pOutputBus->inputNodeInputBusIndex = (ma_uint8)inputNodeInputBusIndex;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Now we need to attach the output bus to the linked list. This involves updating two pointers on
|
Now we need to attach the output bus to the linked list. This involves updating two pointers on
|
||||||
|
|||||||
Reference in New Issue
Block a user