summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2008-12-13 01:32:39 +0000
committerMichael Sevakis <jethead71@rockbox.org>2008-12-13 01:32:39 +0000
commit5e73f9ff2087cc82705b49fc813a6b60633ac756 (patch)
treef0eb330476561208ca0a8f7f91bb879c96d85234 /firmware
parentbdf3004f966b7095b2b404bea9f15f18c9de8918 (diff)
downloadrockbox-5e73f9ff2087cc82705b49fc813a6b60633ac756.tar.gz
rockbox-5e73f9ff2087cc82705b49fc813a6b60633ac756.tar.bz2
rockbox-5e73f9ff2087cc82705b49fc813a6b60633ac756.zip
Fix FS#8660-Recording hardlocks with keyclick enabled and FS#9388-keyclicks too late. Introduce audio_buffer_state to check whether PCM buffer is useable or disabled (trashed).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19411 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/export/audio.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/firmware/export/audio.h b/firmware/export/audio.h
index 4f9ef1a4e1..b4a2c82200 100644
--- a/firmware/export/audio.h
+++ b/firmware/export/audio.h
@@ -104,6 +104,16 @@ void audio_init_playback(void);
unsigned char *audio_get_buffer(bool talk_buf, size_t *buffer_size);
/* only implemented in playback.c, but called from firmware */
+#if CONFIG_CODEC == SWCODEC
+enum audio_buffer_state
+{
+ AUDIOBUF_STATE_TRASHED = -1, /* trashed; must be reset */
+ AUDIOBUF_STATE_INITIALIZED = 0, /* voice+audio OR audio-only */
+ AUDIOBUF_STATE_VOICED_ONLY = 1, /* voice-only */
+};
+int audio_buffer_state(void);
+#endif
+
/* channel modes */
enum rec_channel_modes
{