| 1410 | } |
| 1411 | |
| 1412 | static inline void MixResampleIdentity(const MixContext* mix_context, SoundInstance* instance, uint32_t channels, uint64_t delta, float* mix_buffer[], uint32_t mix_buffer_count, uint32_t avail_framecount) |
| 1413 | { |
| 1414 | DM_PROFILE(__FUNCTION__); |
| 1415 | (void)delta; |
| 1416 | |
| 1417 | PrepTempBufferState(instance, channels); |
| 1418 | |
| 1419 | float scale_l[SOUND_MAX_DECODE_CHANNELS], scale_r[SOUND_MAX_DECODE_CHANNELS]; |
| 1420 | float scale_dl[SOUND_MAX_DECODE_CHANNELS], scale_dr[SOUND_MAX_DECODE_CHANNELS]; |
| 1421 | GetRampDelta(channels, mix_context, instance->m_ScaleL, mix_buffer_count, scale_l, scale_dl); |
| 1422 | GetRampDelta(channels, mix_context, instance->m_ScaleR, mix_buffer_count, scale_r, scale_dr); |
| 1423 | |
| 1424 | if (channels == 1) |
| 1425 | { |
| 1426 | MixScaledMonoToStereo(mix_buffer, g_SoundSystem->GetDecoderBufferBase(0), mix_buffer_count, scale_l[0], scale_r[0], scale_dl[0], scale_dr[0]); |
| 1427 | } |
| 1428 | else |
| 1429 | { |
| 1430 | assert(channels == 2); |
| 1431 | MixScaledStereoToStereo(mix_buffer, g_SoundSystem->GetDecoderBufferBase(0), g_SoundSystem->GetDecoderBufferBase(1), mix_buffer_count, scale_l[0], scale_r[0], scale_dl[0], scale_dr[0], |
| 1432 | scale_l[1], scale_r[1], scale_dl[1], scale_dr[1]); |
| 1433 | } |
| 1434 | |
| 1435 | SaveTempBufferState(instance, avail_framecount, mix_buffer_count, channels); |
| 1436 | } |
| 1437 | |
| 1438 | static inline void MixResamplePolyphase(const MixContext* mix_context, SoundInstance* instance, uint32_t channels, uint64_t delta, float* mix_buffer[], uint32_t mix_buffer_count, uint32_t avail_framecount) |
| 1439 | { |
no test coverage detected