summaryrefslogtreecommitdiff
path: root/apps/codecs/wma.c
diff options
context:
space:
mode:
authorMohamed Tarek <mt@rockbox.org>2010-07-28 12:45:21 +0000
committerMohamed Tarek <mt@rockbox.org>2010-07-28 12:45:21 +0000
commitb1fefcf3e957c2ddd763cb8d52614309ca014a67 (patch)
tree412b66018c7d161d7f85fd919fad11cb49141515 /apps/codecs/wma.c
parent1c372492adf8a6a8dfc0c6e512c02f19995128c2 (diff)
downloadrockbox-b1fefcf3e957c2ddd763cb8d52614309ca014a67.zip
rockbox-b1fefcf3e957c2ddd763cb8d52614309ca014a67.tar.gz
rockbox-b1fefcf3e957c2ddd763cb8d52614309ca014a67.tar.bz2
rockbox-b1fefcf3e957c2ddd763cb8d52614309ca014a67.tar.xz
Modify WMA to produce non-interleaved stereo output (FS#11503 by me). speeds up wma by 3.5MHz on CF and 2.2MHz on ARM.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27591 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/wma.c')
-rw-r--r--apps/codecs/wma.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/apps/codecs/wma.c b/apps/codecs/wma.c
index ed413e8..4c53568 100644
--- a/apps/codecs/wma.c
+++ b/apps/codecs/wma.c
@@ -25,12 +25,6 @@
CODEC_HEADER
-/* The output buffer containing the decoded samples (channels 0 and 1)
- BLOCK_MAX_SIZE is 2048 (samples) and MAX_CHANNELS is 2.
- */
-
-static uint32_t decoded[BLOCK_MAX_SIZE * MAX_CHANNELS] IBSS_ATTR;
-
/* NOTE: WMADecodeContext is 120152 bytes (on x86) */
static WMADecodeContext wmadec;
@@ -100,7 +94,7 @@ restart_track:
resume_offset = 0;
ci->configure(DSP_SWITCH_FREQUENCY, wfx.rate);
ci->configure(DSP_SET_STEREO_MODE, wfx.channels == 1 ?
- STEREO_MONO : STEREO_INTERLEAVED);
+ STEREO_MONO : STEREO_NONINTERLEAVED);
codec_set_replaygain(ci->id3);
/* The main decoding loop */
@@ -157,7 +151,6 @@ new_packet:
for (i=0; i < wmadec.nb_frames; i++)
{
wmares = wma_decode_superframe_frame(&wmadec,
- decoded,
audiobuf, audiobufsize);
ci->yield ();
@@ -173,7 +166,7 @@ new_packet:
goto new_packet;
}
} else if (wmares > 0) {
- ci->pcmbuf_insert(decoded, NULL, wmares);
+ ci->pcmbuf_insert((*wmadec.frame_out)[0], (*wmadec.frame_out)[1], wmares);
elapsedtime += (wmares*10)/(wfx.rate/100);
ci->set_elapsed(elapsedtime);
}