diff options
| author | Michael Sevakis <jethead71@rockbox.org> | 2007-03-04 04:16:53 +0000 |
|---|---|---|
| committer | Michael Sevakis <jethead71@rockbox.org> | 2007-03-04 04:16:53 +0000 |
| commit | 598629c3bf4bf683812c374af7791f06777873f7 (patch) | |
| tree | 8525f563adc7656a9a00e793fe14e6a9bb48fdef /apps/codecs | |
| parent | a61a7fa7aea82a2ead1b0c4ac4b476254589b959 (diff) | |
| download | rockbox-598629c3bf4bf683812c374af7791f06777873f7.zip rockbox-598629c3bf4bf683812c374af7791f06777873f7.tar.gz rockbox-598629c3bf4bf683812c374af7791f06777873f7.tar.bz2 rockbox-598629c3bf4bf683812c374af7791f06777873f7.tar.xz | |
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')
| -rw-r--r-- | apps/codecs/aiff_enc.c | 4 | ||||
| -rw-r--r-- | apps/codecs/mp3_enc.c | 4 | ||||
| -rw-r--r-- | apps/codecs/wav_enc.c | 4 | ||||
| -rw-r--r-- | apps/codecs/wavpack_enc.c | 6 |
4 files changed, 9 insertions, 9 deletions
diff --git a/apps/codecs/aiff_enc.c b/apps/codecs/aiff_enc.c index 02d159e..1de25a4 100644 --- a/apps/codecs/aiff_enc.c +++ b/apps/codecs/aiff_enc.c @@ -354,7 +354,7 @@ enum codec_status codec_main(void) #endif /* main encoding loop */ - while(!ci->stop_codec) + while(!ci->stop_encoder) { uint32_t *src; @@ -362,7 +362,7 @@ enum codec_status codec_main(void) { struct enc_chunk_hdr *chunk; - if (ci->stop_codec) + if (ci->stop_encoder) break; #ifdef HAVE_ADJUSTABLE_CPU_FREQ diff --git a/apps/codecs/mp3_enc.c b/apps/codecs/mp3_enc.c index 81ea47e..daa6cfe 100644 --- a/apps/codecs/mp3_enc.c +++ b/apps/codecs/mp3_enc.c @@ -2482,7 +2482,7 @@ enum codec_status codec_main(void) #endif /* main encoding loop */ - while (!ci->stop_codec) + while (!ci->stop_encoder) { char *buffer; @@ -2490,7 +2490,7 @@ enum codec_status codec_main(void) { struct enc_chunk_hdr *chunk; - if (ci->stop_codec) + if (ci->stop_encoder) break; #ifdef HAVE_ADJUSTABLE_CPU_FREQ diff --git a/apps/codecs/wav_enc.c b/apps/codecs/wav_enc.c index 622ff3a..e14b04d 100644 --- a/apps/codecs/wav_enc.c +++ b/apps/codecs/wav_enc.c @@ -342,7 +342,7 @@ enum codec_status codec_main(void) #endif /* main encoding loop */ - while(!ci->stop_codec) + while(!ci->stop_encoder) { uint32_t *src; @@ -350,7 +350,7 @@ enum codec_status codec_main(void) { struct enc_chunk_hdr *chunk; - if (ci->stop_codec) + if (ci->stop_encoder) break; #ifdef HAVE_ADJUSTABLE_CPU_FREQ diff --git a/apps/codecs/wavpack_enc.c b/apps/codecs/wavpack_enc.c index 547d309..de8fe80 100644 --- a/apps/codecs/wavpack_enc.c +++ b/apps/codecs/wavpack_enc.c @@ -408,7 +408,7 @@ enum codec_status codec_main(void) #endif /* main encoding loop */ - while(!ci->stop_codec) + while(!ci->stop_encoder) { uint8_t *src; @@ -419,7 +419,7 @@ enum codec_status codec_main(void) uint8_t *dst; uint8_t *src_end; - if(ci->stop_codec) + if(ci->stop_encoder) break; abort_chunk = true; @@ -455,7 +455,7 @@ enum codec_status codec_main(void) chunk->num_pcm += PCM_SAMP_PER_CHUNK/4; ci->yield(); /* could've been stopped in some way */ - abort_chunk = ci->stop_codec || + abort_chunk = ci->stop_encoder || (chunk->flags & CHUNKF_ABORT); } |