summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorKyle Repinski <repinski23@gmail.com>2015-03-24 18:06:56 -0500
committerZiyan <jaraidaniel@gmail.com>2016-01-15 12:29:43 +0100
commita53e317643b087e8a2344b84ac2e05da70435d6a (patch)
tree6915cc7af41416e81dc96bf1861065c48f89a885 /audio
parent9889bb6352966f869ccbc682858f2f3a98f8422a (diff)
downloaddevice_samsung_tuna-a53e317643b087e8a2344b84ac2e05da70435d6a.zip
device_samsung_tuna-a53e317643b087e8a2344b84ac2e05da70435d6a.tar.gz
device_samsung_tuna-a53e317643b087e8a2344b84ac2e05da70435d6a.tar.bz2
audio: Make buffer_frames dependent on OUT_RESAMPLER.
(buffer_frames is only used for OUT_RESAMPLER)
Diffstat (limited to 'audio')
-rw-r--r--audio/audio_hw.c6
1 files 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