mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-07 22:55:40 +12:00
HLE DSP: Fix embedded buffer starting sample position
This commit is contained in:
parent
57ecc18f32
commit
6668ba3e37
1 changed files with 4 additions and 1 deletions
|
@ -292,6 +292,9 @@ namespace Audio {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config.embeddedBufferDirty) {
|
if (config.embeddedBufferDirty) {
|
||||||
|
// Annoyingly, and only for embedded buffer, whether we use config.playPosition depends on the relevant dirty bit
|
||||||
|
const u32 playPosition = config.playPositionDirty ? config.playPosition : 0;
|
||||||
|
|
||||||
config.embeddedBufferDirty = 0;
|
config.embeddedBufferDirty = 0;
|
||||||
if (s32(config.length) >= 0) [[likely]] {
|
if (s32(config.length) >= 0) [[likely]] {
|
||||||
// TODO: Add sample format and channel count
|
// TODO: Add sample format and channel count
|
||||||
|
@ -303,7 +306,7 @@ namespace Audio {
|
||||||
.adpcmDirty = config.adpcmDirty != 0,
|
.adpcmDirty = config.adpcmDirty != 0,
|
||||||
.looping = config.isLooping != 0,
|
.looping = config.isLooping != 0,
|
||||||
.bufferID = config.bufferID,
|
.bufferID = config.bufferID,
|
||||||
.playPosition = config.playPosition,
|
.playPosition = playPosition,
|
||||||
.format = source.sampleFormat,
|
.format = source.sampleFormat,
|
||||||
.sourceType = source.sourceType,
|
.sourceType = source.sourceType,
|
||||||
.fromQueue = false,
|
.fromQueue = false,
|
||||||
|
|
Loading…
Add table
Reference in a new issue