summaryrefslogtreecommitdiffstats
path: root/apps/codecs/aiff_enc.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2011-02-23 14:31:13 +0000
committerMichael Sevakis <jethead71@rockbox.org>2011-02-23 14:31:13 +0000
commit65109732230849eeb9eec2f56f9e046ad6b476c3 (patch)
tree51096b18d823cfb05575335b91e3d1eb75ca4e27 /apps/codecs/aiff_enc.c
parent43b38b71f5944c1a29060847b58d7e79f7dfe428 (diff)
downloadrockbox-65109732230849eeb9eec2f56f9e046ad6b476c3.tar.gz
rockbox-65109732230849eeb9eec2f56f9e046ad6b476c3.tar.bz2
rockbox-65109732230849eeb9eec2f56f9e046ad6b476c3.zip
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
Diffstat (limited to 'apps/codecs/aiff_enc.c')
-rw-r--r--apps/codecs/aiff_enc.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/apps/codecs/aiff_enc.c b/apps/codecs/aiff_enc.c
index 2d55dff755..69496f70ac 100644
--- a/apps/codecs/aiff_enc.c
+++ b/apps/codecs/aiff_enc.c
@@ -363,16 +363,10 @@ static bool init_encoder(void)
enum codec_status codec_main(void)
{
if (!init_encoder())
- {
- 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)
{
uint32_t *src;
@@ -380,7 +374,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();
@@ -400,8 +394,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 */