Allow audio samples to be played back from anywhere in memory rather than ARAM.

This is accomplished through a new mAramBaseAddress field on the DSP channels, which effectively relocates ARAM for that channel.
This commit is contained in:
PJB3005
2026-07-25 15:49:13 +02:00
parent 30c36df76b
commit ad80933ccf
8 changed files with 57 additions and 3 deletions
+3 -2
View File
@@ -317,7 +317,7 @@ void dusk::audio::DspRender(OutputSubframe& subframe) {
}
OutputSubframe channelSubframe = {};
if (channel.mWaveAramAddress == 0) {
if (channel.mWaveAramAddress == 0 && !channel.mAramBaseAddress) {
RenderOscChannel(channel, channelAux, channelSubframe);
} else {
ValidateChannel(channel);
@@ -455,7 +455,8 @@ static int ReadChannelSamplesChunk(
assert(desiredSamples >= 0);
auto aramBase = static_cast<u8*>(ARGetStorageAddress()) + channel.mWaveAramAddress;
auto aramBase = static_cast<u8 const*>(channel.mAramBaseAddress ? channel.mAramBaseAddress : ARGetStorageAddress());
aramBase += channel.mWaveAramAddress;
auto curSamplePosition = channel.mSamplePosition;
u32 skipSamples = curSamplePosition % channel.mSamplesPerBlock;