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/wavpack_enc.c | |
parent | a61a7fa7aea82a2ead1b0c4ac4b476254589b959 (diff) | |
download | rockbox-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/wavpack_enc.c')
-rw-r--r-- | apps/codecs/wavpack_enc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/codecs/wavpack_enc.c b/apps/codecs/wavpack_enc.c index 547d309159..de8fe80423 100644 --- a/apps/codecs/wavpack_enc.c +++ b/apps/codecs/wavpack_enc.c | |||
@@ -408,7 +408,7 @@ enum codec_status codec_main(void) | |||
408 | #endif | 408 | #endif |
409 | 409 | ||
410 | /* main encoding loop */ | 410 | /* main encoding loop */ |
411 | while(!ci->stop_codec) | 411 | while(!ci->stop_encoder) |
412 | { | 412 | { |
413 | uint8_t *src; | 413 | uint8_t *src; |
414 | 414 | ||
@@ -419,7 +419,7 @@ enum codec_status codec_main(void) | |||
419 | uint8_t *dst; | 419 | uint8_t *dst; |
420 | uint8_t *src_end; | 420 | uint8_t *src_end; |
421 | 421 | ||
422 | if(ci->stop_codec) | 422 | if(ci->stop_encoder) |
423 | break; | 423 | break; |
424 | 424 | ||
425 | abort_chunk = true; | 425 | abort_chunk = true; |
@@ -455,7 +455,7 @@ enum codec_status codec_main(void) | |||
455 | chunk->num_pcm += PCM_SAMP_PER_CHUNK/4; | 455 | chunk->num_pcm += PCM_SAMP_PER_CHUNK/4; |
456 | ci->yield(); | 456 | ci->yield(); |
457 | /* could've been stopped in some way */ | 457 | /* could've been stopped in some way */ |
458 | abort_chunk = ci->stop_codec || | 458 | abort_chunk = ci->stop_encoder || |
459 | (chunk->flags & CHUNKF_ABORT); | 459 | (chunk->flags & CHUNKF_ABORT); |
460 | } | 460 | } |
461 | 461 | ||