forked from len0rd/rockbox
Use direct non-interleaved full precision output data instead of converting to 16 bit interleaved data.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7734 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
3661215134
commit
0263ece7f8
2 changed files with 10 additions and 6 deletions
|
@ -66,8 +66,8 @@ enum codec_status codec_start(struct codec_api* api)
|
|||
|
||||
ci->configure(CODEC_DSP_ENABLE, (bool *)true);
|
||||
ci->configure(DSP_DITHER, (bool *)false);
|
||||
ci->configure(DSP_SET_STEREO_MODE, (int *)STEREO_INTERLEAVED);
|
||||
ci->configure(DSP_SET_SAMPLE_DEPTH, (int *)(16));
|
||||
ci->configure(DSP_SET_STEREO_MODE, (int *)STEREO_NONINTERLEAVED);
|
||||
ci->configure(DSP_SET_SAMPLE_DEPTH, (int *)(29));
|
||||
|
||||
next_track:
|
||||
|
||||
|
@ -100,7 +100,7 @@ enum codec_status codec_start(struct codec_api* api)
|
|||
}
|
||||
|
||||
NeAACDecConfigurationPtr conf = NeAACDecGetCurrentConfiguration(hDecoder);
|
||||
conf->outputFormat = 1; // 16-bit integers
|
||||
conf->outputFormat = FAAD_FMT_24BIT; /* irrelevant, we don't convert */
|
||||
NeAACDecSetConfiguration(hDecoder, conf);
|
||||
|
||||
unsigned long s=0;
|
||||
|
@ -147,7 +147,8 @@ enum codec_status codec_start(struct codec_api* api)
|
|||
/* Decode one block - returned samples will be host-endian */
|
||||
rb->yield();
|
||||
decodedbuffer = NeAACDecDecode(hDecoder, &frameInfo, buffer, n);
|
||||
|
||||
/* ignore decodedbuffer return value, we access samples in the
|
||||
decoder struct directly */
|
||||
if (frameInfo.error > 0) {
|
||||
LOGF("FAAD: decoding error \"%s\"\n", NeAACDecGetErrorMessage(frameInfo.error));
|
||||
return CODEC_ERROR;
|
||||
|
@ -161,7 +162,9 @@ enum codec_status codec_start(struct codec_api* api)
|
|||
|
||||
/* Output the audio */
|
||||
rb->yield();
|
||||
while (!rb->pcmbuf_insert((char*)decodedbuffer, frameInfo.samples << 1))
|
||||
while (!rb->pcmbuf_insert_split(hDecoder->time_out[0],
|
||||
hDecoder->time_out[1],
|
||||
frameInfo.samples*2))
|
||||
rb->yield();
|
||||
|
||||
/* Update the elapsed-time indicator */
|
||||
|
|
|
@ -982,9 +982,10 @@ static void* aac_frame_decode(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo,
|
|||
}
|
||||
#endif
|
||||
|
||||
/* we don't need sample conversion in rockbox.
|
||||
sample_buffer = output_to_PCM(hDecoder, hDecoder->time_out, sample_buffer,
|
||||
output_channels, frame_len, hDecoder->config.outputFormat);
|
||||
|
||||
*/
|
||||
|
||||
hDecoder->postSeekResetFlag = 0;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue