FS#9210 - ASAP plugin

Attached to Project: Rockbox
Opened by Dominik Wenger (Domonoky) - Wednesday, 23 July 2008, 19:07 GMT
Last edited by Dominik Wenger (Domonoky) - Saturday, 26 July 2008, 15:43 GMT
Task Type Patches
Category Plugins
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Low
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No



i made a first attempt for a ASAP ( port to Rockbox.
This is a very crude port of the asap2wav program to a rockbox plugin.
It works as a Viewer and converts a .sap file to "test.wav" in the root folder. (test.wav has to exist before).

On Simulator it works nicly, but not on Target.
It tested it on a m:robe100 and it runs without error, but does not produce correct sound.
I only get loud cracking and such in the wav file.

I suspect this is because of some endianess problems. (our targets are big-endian, where pc is little-endian).
EDIT: m:robe100 is LE, so it cant be endian problems.

At the moment i dont know where and how to attack this problem, as the asap code seems to have nearly no way to tell if something is gone wrong. (and its full of a MACRO hell )

so if others want to join the fun, jump in :-)

   asap.patch (613.1 KiB)
This task depends upon

Closed by  Dominik Wenger (Domonoky)
Saturday, 26 July 2008, 15:43 GMT
Reason for closing:  Accepted
Comment by Dave Chapman (linuxstb) - Wednesday, 23 July 2008, 20:03 GMT
I also did the same thing... Here's my attempt (just the apps/plugins/asap2wav/ directory, not a patch).
Comment by Dominik Wenger (Domonoky) - Friday, 25 July 2008, 19:24 GMT
Here is now a patch with asap as a codec.

Its still very early, no metadata parser is in place, so songlengh others are fake.

But it plays sound without problems. I tested on sim and on m:robe100.
On m:robe100 i got ~850% realtime. so no performance problems :-)

forgot to remove the memset.
delete line 118 in apps/codecs/asap.c
Comment by Dominik Wenger (Domonoky) - Friday, 25 July 2008, 19:59 GMT
i think i messed up the patch.
new try:
Comment by Bertrik Sikken (bertrik) - Friday, 25 July 2008, 22:06 GMT
Attached is a fixed test-codec2.patch (apps/codecs/asap.c was missing)
Comment by Robert Menes (RMenes379) - Friday, 25 July 2008, 22:25 GMT
bertrik's patch worked successfully. I managed to compile a working build with SAP support on my Sansa c240.

I get ~160.19% realtime, according to test_codec.

Decode time - 16.23s
File duration - 26.00s
Comment by Dominik Wenger (Domonoky) - Friday, 25 July 2008, 22:38 GMT
last patch for today.

now with metadata parser.

elapsed_time and sub_songs, seeking handling still missing.

Comment by Dominik Wenger (Domonoky) - Saturday, 26 July 2008, 13:24 GMT
Now it plays and seeks correctly.
Only thing missing is SubSong handling. At the moment it always plays the default song.

small fix, so it correctly works on big-endian targets.