mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-24 01:04:02 +02:00
Add validation for the pitch in ma_sound_set_pitch().
This commit is contained in:
@@ -72687,6 +72687,10 @@ MA_API void ma_sound_set_pitch(ma_sound* pSound, float pitch)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (pitch <= 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
c89atomic_exchange_explicit_f32(&pSound->engineNode.pitch, pitch, c89atomic_memory_order_release);
|
c89atomic_exchange_explicit_f32(&pSound->engineNode.pitch, pitch, c89atomic_memory_order_release);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user