summaryrefslogtreecommitdiff
path: root/apps/plugin.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugin.c')
-rw-r--r--apps/plugin.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/plugin.c b/apps/plugin.c
index 25f1865..3a893fc 100644
--- a/apps/plugin.c
+++ b/apps/plugin.c
@@ -674,12 +674,18 @@ void* plugin_get_buffer(int* buffer_size)
}
/* Returns a pointer to the mp3 buffer.
- Playback gets stopped, to avoid conflicts. */
+ Playback gets stopped, to avoid conflicts.
+ Talk buffer is stolen as well.
+ */
void* plugin_get_audio_buffer(int* buffer_size)
{
+#if CONFIG_CODEC == SWCODEC
+ return audio_get_buffer(true, (size_t *)buffer_size);
+#else
audio_stop();
talk_buffer_steal(); /* we use the mp3 buffer, need to tell */
*buffer_size = audiobufend - audiobuf;
+#endif
return audiobuf;
}