mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-23 16:54:03 +02:00
Minor restructuring and fix the C++ build.
This commit is contained in:
+3
-3
@@ -47848,8 +47848,6 @@ MA_API ma_result ma_gainer_process_pcm_frames(ma_gainer* pGainer, void* pFramesO
|
|||||||
{
|
{
|
||||||
ma_uint64 iFrame;
|
ma_uint64 iFrame;
|
||||||
ma_uint32 iChannel;
|
ma_uint32 iChannel;
|
||||||
float* pFramesOutF32 = (float*)pFramesOut;
|
|
||||||
const float* pFramesInF32 = (const float*)pFramesIn;
|
|
||||||
ma_uint64 interpolatedFrameCount;
|
ma_uint64 interpolatedFrameCount;
|
||||||
|
|
||||||
if (pGainer == NULL) {
|
if (pGainer == NULL) {
|
||||||
@@ -47887,6 +47885,8 @@ MA_API ma_result ma_gainer_process_pcm_frames(ma_gainer* pGainer, void* pFramesO
|
|||||||
we can make a copy here on the stack. For extreme channel counts we can fall back to a slower
|
we can make a copy here on the stack. For extreme channel counts we can fall back to a slower
|
||||||
implementation which just uses a standard lerp.
|
implementation which just uses a standard lerp.
|
||||||
*/
|
*/
|
||||||
|
float* pFramesOutF32 = (float*)pFramesOut;
|
||||||
|
const float* pFramesInF32 = (const float*)pFramesIn;
|
||||||
float a = (float)pGainer->t / pGainer->config.smoothTimeInFrames;
|
float a = (float)pGainer->t / pGainer->config.smoothTimeInFrames;
|
||||||
float d = 1.0f / pGainer->config.smoothTimeInFrames;
|
float d = 1.0f / pGainer->config.smoothTimeInFrames;
|
||||||
|
|
||||||
@@ -47958,7 +47958,7 @@ MA_API ma_result ma_gainer_process_pcm_frames(ma_gainer* pGainer, void* pFramesO
|
|||||||
|
|
||||||
/* All we need to do here is apply the new gains using an optimized path. */
|
/* All we need to do here is apply the new gains using an optimized path. */
|
||||||
if (pFramesOut != NULL && pFramesIn != NULL) {
|
if (pFramesOut != NULL && pFramesIn != NULL) {
|
||||||
ma_copy_and_apply_volume_factor_per_channel_f32(pFramesOut, pFramesIn, frameCount, pGainer->config.channels, pGainer->pNewGains);
|
ma_copy_and_apply_volume_factor_per_channel_f32((float*)pFramesOut, (const float*)pFramesIn, frameCount, pGainer->config.channels, pGainer->pNewGains);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Now that some frames have been processed we need to make sure future changes to the gain are interpolated. */
|
/* Now that some frames have been processed we need to make sure future changes to the gain are interpolated. */
|
||||||
|
|||||||
Reference in New Issue
Block a user