diff options
| author | Brandon Low <lostlogic@rockbox.org> | 2006-04-22 14:40:13 +0000 |
|---|---|---|
| committer | Brandon Low <lostlogic@rockbox.org> | 2006-04-22 14:40:13 +0000 |
| commit | f3bc1efc49826454a895c1c1f46fbe2cfd23f492 (patch) | |
| tree | 676d501a9e75a9420f07a13f1d7fc1c5820b432a /apps/codecs/alac.c | |
| parent | b5991b27cafa8cc8bd2e86e04110beec34a587e0 (diff) | |
| download | rockbox-f3bc1efc49826454a895c1c1f46fbe2cfd23f492.zip rockbox-f3bc1efc49826454a895c1c1f46fbe2cfd23f492.tar.gz rockbox-f3bc1efc49826454a895c1c1f46fbe2cfd23f492.tar.bz2 rockbox-f3bc1efc49826454a895c1c1f46fbe2cfd23f492.tar.xz | |
First commit of reworking voice to be mroe stable on swcodec
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9758 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/alac.c')
| -rw-r--r-- | apps/codecs/alac.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/codecs/alac.c b/apps/codecs/alac.c index 73f45fc..01172ee 100644 --- a/apps/codecs/alac.c +++ b/apps/codecs/alac.c @@ -64,7 +64,6 @@ enum codec_status codec_start(struct codec_api* api) ci->configure(CODEC_SET_FILEBUF_WATERMARK, (int *)(1024*512)); ci->configure(CODEC_SET_FILEBUF_CHUNKSIZE, (int *)(1024*128)); - ci->configure(CODEC_DSP_ENABLE, (bool *)true); ci->configure(DSP_DITHER, (bool *)false); ci->configure(DSP_SET_STEREO_MODE, (int *)STEREO_NONINTERLEAVED); ci->configure(DSP_SET_SAMPLE_DEPTH, (int *)(ALAC_OUTPUT_DEPTH-1)); @@ -89,7 +88,7 @@ enum codec_status codec_start(struct codec_api* api) if (!qtmovie_read(&input_stream, &demux_res)) { LOGF("ALAC: Error initialising file\n"); retval = CODEC_ERROR; - goto exit; + goto done; } /* initialise the sound converter */ @@ -121,7 +120,7 @@ enum codec_status codec_start(struct codec_api* api) &sample_byte_size)) { LOGF("ALAC: Error in get_sample_info\n"); retval = CODEC_ERROR; - goto exit; + goto done; } /* Request the required number of bytes from the input buffer */ @@ -129,7 +128,7 @@ enum codec_status codec_start(struct codec_api* api) buffer=ci->request_buffer(&n,sample_byte_size); if (n!=sample_byte_size) { retval = CODEC_ERROR; - goto exit; + goto done; } /* Decode one block - returned samples will be host-endian */ @@ -156,13 +155,14 @@ enum codec_status codec_start(struct codec_api* api) i++; } + retval = CODEC_OK; +done: LOGF("ALAC: Decoded %d samples\n",samplesdone); if (ci->request_next_track()) goto next_track; - retval = CODEC_OK; exit: return retval; } |