/* Saturate the output signal to signed 16bit integers. */
static void saturate_output_float(COOKContext *q, int chan, int16_t *out)
/* Saturate the output signal to signed 16bit integers. */
static void saturate_output_float(COOKContext *q, int chan, int16_t *out)
{
    int j;
    float *output = q->mono_mdct_output + q->samples_per_channel;
    for (j = 0; j < q->samples_per_channel; j++) {
        out[chan + q->nb_channels * j] =
          av_clip_int16(lrintf(output[j]));
    }
}