summaryrefslogtreecommitdiff
path: root/apps/codecs.h
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2007-03-04 04:16:53 +0000
committerMichael Sevakis <jethead71@rockbox.org>2007-03-04 04:16:53 +0000
commit598629c3bf4bf683812c374af7791f06777873f7 (patch)
tree8525f563adc7656a9a00e793fe14e6a9bb48fdef /apps/codecs.h
parenta61a7fa7aea82a2ead1b0c4ac4b476254589b959 (diff)
downloadrockbox-598629c3bf4bf683812c374af7791f06777873f7.tar.gz
rockbox-598629c3bf4bf683812c374af7791f06777873f7.zip
SWCODEC Recording Codecs: Fix problems with hanging recording screen (chiefly on x5) when no voice file present and source is not FMRadio. Caused by extra audio stops causing encoder to unload prematurely. Fix is to have separate stop flags for each codec type to prevent collisions. Also now safe to plug into USB when recording and encoder will stay loaded and not be stopped by the call to audio_stop_playback. Additional discovery: playback will not be able to restart after a USB plug during recording. Probably an old bug. I recommend in the future that recording have higher priority on system resources than playback and playback be denied access explicitly if recording requires them. Codec API becomes incompatible so do full updates.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12579 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs.h')
-rw-r--r--apps/codecs.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/codecs.h b/apps/codecs.h
index 3d7ead159e..6710afdc8e 100644
--- a/apps/codecs.h
+++ b/apps/codecs.h
@@ -90,12 +90,12 @@
90#define CODEC_ENC_MAGIC 0x52454E43 /* RENC */ 90#define CODEC_ENC_MAGIC 0x52454E43 /* RENC */
91 91
92/* increase this every time the api struct changes */ 92/* increase this every time the api struct changes */
93#define CODEC_API_VERSION 14 93#define CODEC_API_VERSION 15
94 94
95/* update this to latest version if a change to the api struct breaks 95/* update this to latest version if a change to the api struct breaks
96 backwards compatibility (and please take the opportunity to sort in any 96 backwards compatibility (and please take the opportunity to sort in any
97 new function which are "waiting" at the end of the function table) */ 97 new function which are "waiting" at the end of the function table) */
98#define CODEC_MIN_API_VERSION 14 98#define CODEC_MIN_API_VERSION 15
99 99
100/* codec return codes */ 100/* codec return codes */
101enum codec_status { 101enum codec_status {
@@ -303,6 +303,7 @@ struct codec_api {
303#endif 303#endif
304 304
305#if defined(HAVE_RECORDING) && !defined(SIMULATOR) 305#if defined(HAVE_RECORDING) && !defined(SIMULATOR)
306 volatile bool stop_encoder;
306 volatile int enc_codec_loaded; /* <0=error, 0=pending, >0=ok */ 307 volatile int enc_codec_loaded; /* <0=error, 0=pending, >0=ok */
307 void (*enc_get_inputs)(struct enc_inputs *inputs); 308 void (*enc_get_inputs)(struct enc_inputs *inputs);
308 void (*enc_set_parameters)(struct enc_parameters *params); 309 void (*enc_set_parameters)(struct enc_parameters *params);