Question about possible ADPCM streaming
Posted: Mon Jul 16, 2012 8:56 pm
If I understand the way Maxmod works, ADPCM cannot be streamed because streaming uses a ring-buffer, which would interfere with how ADPCM audio is played (which is having an initial sample and table index, followed by 4-bit values that contribute to the decoding process to 16-bit samples).
My question is when looping ADPCM audio, is the SAD actually reloaded, or does that value become stored internally? I ask this because if the SAD does get reloaded from that point in memory, would changing that affect the resulting ADPCM audio? If so, then maybe we could get ADPCM streaming working with this idea I have. Instead of having the ADPCM audio as one single entity (with one header + data), make the ADPCM audio split into multiple entities (each with their own header + data), concatenated together in a sequence, and make the length of each equal to the buffer length to be used for the stream? I would assume that Maxmod would have to compensate for that initial sample/index since it isn't the same size as the individual compressed data that follows.
Of course, this type of format would be different from what the normal ADPCM format for the DS is stored as.
My question is when looping ADPCM audio, is the SAD actually reloaded, or does that value become stored internally? I ask this because if the SAD does get reloaded from that point in memory, would changing that affect the resulting ADPCM audio? If so, then maybe we could get ADPCM streaming working with this idea I have. Instead of having the ADPCM audio as one single entity (with one header + data), make the ADPCM audio split into multiple entities (each with their own header + data), concatenated together in a sequence, and make the length of each equal to the buffer length to be used for the stream? I would assume that Maxmod would have to compensate for that initial sample/index since it isn't the same size as the individual compressed data that follows.
Of course, this type of format would be different from what the normal ADPCM format for the DS is stored as.