From a53e317643b087e8a2344b84ac2e05da70435d6a Mon Sep 17 00:00:00 2001 From: Kyle Repinski Date: Tue, 24 Mar 2015 18:06:56 -0500 Subject: audio: Make buffer_frames dependent on OUT_RESAMPLER. (buffer_frames is only used for OUT_RESAMPLER) --- audio/audio_hw.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/audio/audio_hw.c b/audio/audio_hw.c index 24f507f..12a3493 100644 --- a/audio/audio_hw.c +++ b/audio/audio_hw.c @@ -703,8 +703,8 @@ struct tuna_stream_out { #ifdef OUT_RESAMPLER struct resampler_itfe *resampler; char *buffer; -#endif size_t buffer_frames; +#endif int standby; struct echo_reference_itfe *echo_reference; int write_threshold; @@ -1478,8 +1478,8 @@ static int start_output_stream_low_latency(struct tuna_stream_out *out) } if (success) { - out->buffer_frames = pcm_config_tones.period_size * 2; #ifdef OUT_RESAMPLER + out->buffer_frames = pcm_config_tones.period_size * 2; if (out->buffer == NULL) out->buffer = malloc(out->buffer_frames * audio_stream_out_frame_size(&out->stream)); #endif @@ -1530,8 +1530,8 @@ static int start_output_stream_deep_buffer(struct tuna_stream_out *out) out->pcm[PCM_NORMAL] = NULL; return -ENOMEM; } - out->buffer_frames = DEEP_BUFFER_SHORT_PERIOD_SIZE * 2; #ifdef OUT_RESAMPLER + out->buffer_frames = DEEP_BUFFER_SHORT_PERIOD_SIZE * 2; if (out->buffer == NULL) out->buffer = malloc(out->buffer_frames * audio_stream_out_frame_size(&out->stream)); #endif -- cgit v1.1