Commit c07411dd authored by David Reid's avatar David Reid

Fix a bug in period size calculation.

parent f3e18dd2
...@@ -8358,7 +8358,7 @@ MA_API ma_result ma_engine_init(const ma_engine_config* pConfig, ma_engine* pEng ...@@ -8358,7 +8358,7 @@ MA_API ma_result ma_engine_init(const ma_engine_config* pConfig, ma_engine* pEng
pEngine->channels = pEngine->pDevice->playback.channels; pEngine->channels = pEngine->pDevice->playback.channels;
pEngine->sampleRate = pEngine->pDevice->sampleRate; pEngine->sampleRate = pEngine->pDevice->sampleRate;
pEngine->periodSizeInFrames = pEngine->pDevice->playback.internalPeriodSizeInFrames; pEngine->periodSizeInFrames = pEngine->pDevice->playback.internalPeriodSizeInFrames;
pEngine->periodSizeInMilliseconds = (pEngine->periodSizeInFrames * pEngine->sampleRate) / 1000; pEngine->periodSizeInMilliseconds = (pEngine->periodSizeInFrames * 1000) / pEngine->sampleRate;
/* We need a default sound group. This must be done after setting the format, channels and sample rate to their proper values. */ /* We need a default sound group. This must be done after setting the format, channels and sample rate to their proper values. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment