From 65109732230849eeb9eec2f56f9e046ad6b476c3 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Wed, 23 Feb 2011 14:31:13 +0000 Subject: Give playback engine better control over the codec. Codec simply follows commands and doesn't concern itself with audio state. Get track change notification in on the actual last buffer insert of the track because now audio simply waits for a track change notify from PCM on the last track and it must be sent reliably. This is still at an intermediate stage but works. Codecs and plugins become incompatible. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29387 a1c6a512-1295-4272-9138-f99709370657 --- apps/codecs/mp3_enc.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'apps/codecs/mp3_enc.c') diff --git a/apps/codecs/mp3_enc.c b/apps/codecs/mp3_enc.c index c66d755..e7893fd 100644 --- a/apps/codecs/mp3_enc.c +++ b/apps/codecs/mp3_enc.c @@ -2588,16 +2588,10 @@ enum codec_status codec_main(void) { /* Generic codec initialisation */ if (!enc_init()) - { - ci->enc_codec_loaded = -1; return CODEC_ERROR; - } - - /* main application waits for this flag during encoder loading */ - ci->enc_codec_loaded = 1; /* main encoding loop */ - while (!ci->stop_encoder) + while (!ci->stop_codec) { char *buffer; @@ -2605,7 +2599,7 @@ enum codec_status codec_main(void) { struct enc_chunk_hdr *chunk; - if (ci->stop_encoder) + if (ci->stop_codec) break; chunk = ci->enc_get_chunk(); @@ -2630,8 +2624,5 @@ enum codec_status codec_main(void) /* reset parameters to initial state */ ci->enc_set_parameters(NULL); - /* main application waits for this flag during encoder removing */ - ci->enc_codec_loaded = 0; - return CODEC_OK; } /* codec_start */ -- cgit v1.1