Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/audio/google/google_rtc_audio_processing.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ static ALWAYS_INLINE float s32_to_float(const char *ptr)

static ALWAYS_INLINE void float_to_s32(float x, char *dst)
{
*(int32_t *)dst = (int16_t)clamp_rescale(-(float)INT_MIN, x);
/* in float, 1.0f - 1.0f / 2^31 rounds to 1.0f, so full scale reaches 2^31 */
*(int32_t *)dst = sat_int32((int64_t)clamp_rescale(-(float)INT_MIN, x));
}

static ALWAYS_INLINE void source_to_float(struct sof_source *src, float **dst_bufs,
Expand Down
Loading