Playing ADPCM sounds on Amiga… November 5, 2006
Posted by winden in coding, demoscene.trackback
So yesterday I finally started to code an ADPCM sound player, since upon scrounging google I didn’t really manage to find any public 680×0 sources to do the playing like for example can be done with players like “the player 6.1” are not turned up when searched for, so maybe there are really free-to-use players… but anyways, armed with a tutorial from jurassic pack 14 by scicco/scarab about how to drive the Amiga to make a buffered sound loop, I dove into the hardware hacking and a few hours later I had a 16bit uncrompressed wav sounding as a 8bit realtime dithered wave on the Amy.
Fun started when I started trying to covert the standards-provided reference sourcecode for IMA-ADPCM into a 680×0 routine… and today after a few more hours it’s starting to sound somewhat like the original but with pops and clcks (which the original roxette song didn’t have ;)… so I think I may be nearing the first version with proper sound :)
What I’ve also detected is that ADPCM decoding will be difficult to optimise regarding cpu pairing and the like… so after I have it working maybe I’ll have to spend some time making my own compressed format which could be decoded with less serial dependencies.
Off to code some more…
I haven’t really looked at the code the TBL guys use to replay music but I suspect the decoder is probably interleaved with other stuff, maybe using the FPU for something else at the same time. About the output quality, how about using the 14bit trick?
Animo, tu puedes conseguirlo!!! Amiga scene never dies!!!only sleeps!
go go go Winden :o)
mmm esto se pone interesante… :-)
Decoding ADPCM (or similar) is reasonably quick. Our implementation takes perhaps 10 scanlines on 060 for decoding a 22kHz mono stream to 14bit output. We are not doing anything particularly fancy — just remember to do any chipwrites as longword packets.
Since decoding takes just 10 scanlines, there is little point in me optimizing it further or trying to do some kind of FPU work in parallel. That effort is better spent in other areas.