#165330 - DiscoStew - Wed Dec 17, 2008 6:41 am
I've taken some time looking over the actual IMA-ADPCM format, and in my mind, I don't see how it can't be done. While it takes more input for correct streaming (particularly with the required buffer) and is much more restrictive in terms of editing on-the-fly, I still think it is possible.
While PCM is completely uncompressed and has no specifics buffer-wise, IMA-ADPCM is comprised of blocks of compressed data of a set size, each having a header containing an initial uncompressed sample and table index followed by 4-bit compressed samples (or 3-bit if compressed that way). I'd say that if you have a buffer that was of exact size as the block alignment (which is provided in the file header of the IMA-ADPCM WAVE file being used), you could just stream each block in sequence into the buffer, and Maxmod + the hardware should handle the rest. That is of course if Maxmod doesn't do anything else to the data that wouldn't already be done with the PCM format.
This is where I got my information...
http://icculus.org/SDL_sound/downloads/external_documentation/wavecomp.htm
(Just scroll down to IMA ADPCM Wave Type or DVI ADPCM Wave Type, as they are basically the same)
I'm actually making a fun side project which can playback streaming PCM WAV files with libfat (which is done, but needs cosmetic clean up on Isle 1), and am in the process of the manual decompression cycle of the IMA-ADPCM format via the callback function, so I'll see how that goes.
_________________
DS - It's all about DiscoStew
While PCM is completely uncompressed and has no specifics buffer-wise, IMA-ADPCM is comprised of blocks of compressed data of a set size, each having a header containing an initial uncompressed sample and table index followed by 4-bit compressed samples (or 3-bit if compressed that way). I'd say that if you have a buffer that was of exact size as the block alignment (which is provided in the file header of the IMA-ADPCM WAVE file being used), you could just stream each block in sequence into the buffer, and Maxmod + the hardware should handle the rest. That is of course if Maxmod doesn't do anything else to the data that wouldn't already be done with the PCM format.
This is where I got my information...
http://icculus.org/SDL_sound/downloads/external_documentation/wavecomp.htm
(Just scroll down to IMA ADPCM Wave Type or DVI ADPCM Wave Type, as they are basically the same)
I'm actually making a fun side project which can playback streaming PCM WAV files with libfat (which is done, but needs cosmetic clean up on Isle 1), and am in the process of the manual decompression cycle of the IMA-ADPCM format via the callback function, so I'll see how that goes.
_________________
DS - It's all about DiscoStew