aboutsummaryrefslogtreecommitdiff
path: root/audio/audio_template.h
diff options
context:
space:
mode:
Diffstat (limited to 'audio/audio_template.h')
-rw-r--r--audio/audio_template.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/audio/audio_template.h b/audio/audio_template.h
index dd87170..a0b653f 100644
--- a/audio/audio_template.h
+++ b/audio/audio_template.h
@@ -95,13 +95,13 @@ static void glue(audio_pcm_hw_alloc_resources_, TYPE)(HW *hw)
static void glue (audio_pcm_sw_free_resources_, TYPE) (SW *sw)
{
- g_free (sw->buf);
+ g_free(sw->resample_buf.buffer);
+ sw->resample_buf.buffer = NULL;
+ sw->resample_buf.size = 0;
if (sw->rate) {
st_rate_stop (sw->rate);
}
-
- sw->buf = NULL;
sw->rate = NULL;
}
@@ -138,7 +138,9 @@ static int glue (audio_pcm_sw_alloc_resources_, TYPE) (SW *sw)
return -1;
}
- sw->buf = g_new0(st_sample, samples);
+ sw->resample_buf.buffer = g_new0(st_sample, samples);
+ sw->resample_buf.size = samples;
+ sw->resample_buf.pos = 0;
#ifdef DAC
sw->rate = st_rate_start (sw->info.freq, sw->hw->info.freq);