From 22e802e80048defd401462e062afcb10093ac793 Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Thu, 30 May 2013 11:24:16 +0200 Subject: playback,talk: Share audiobuffer via core_alloc_maximum(). This fixes the radioart crash that was the result of buffering.c working on a freed buffer at the same time as buflib (radioart uses buffering.c for the images). With this change the buffer is owned by buflib exclusively so this cannot happen. As a result, audio_get_buffer() doesn't exist anymore. Callers should call core_alloc_maximum() directly. This buffer needs to be protected as usual against movement if necessary (previously it was not protected at all which cased the radioart crash), To get most of it they can adjust the willingness of the talk engine to give its buffer away (at the expense of disabling voice interface) with the new talk_buffer_set_policy() function. Change-Id: I52123012208d04967876a304451d634e2bef3a33 --- firmware/export/audio.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'firmware/export/audio.h') diff --git a/firmware/export/audio.h b/firmware/export/audio.h index 8108f50939..57f7981b34 100644 --- a/firmware/export/audio.h +++ b/firmware/export/audio.h @@ -75,10 +75,6 @@ void audio_error_clear(void); int audio_get_file_pos(void); void audio_beep(int duration); -/* Required call when audio buffer is required for some other purpose */ -/* implemented in apps but called from firmware(!) */ -unsigned char *audio_get_buffer(bool talk_buf, size_t *buffer_size); - #if CONFIG_CODEC == SWCODEC void audio_next_dir(void); void audio_prev_dir(void); -- cgit v1.2.3