mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-08 23:25:40 +12:00
HLE DSP: Stub audio output
This commit is contained in:
parent
e22bc58060
commit
66be960150
1 changed files with 8 additions and 2 deletions
|
@ -211,11 +211,11 @@ namespace Audio {
|
||||||
|
|
||||||
if (audioEnabled) {
|
if (audioEnabled) {
|
||||||
// Wait until we've actually got room to push our frame
|
// Wait until we've actually got room to push our frame
|
||||||
while (sampleBuffer.size() + 2 > sampleBuffer.Capacity()) {
|
while (sampleBuffer.size() + frame.size() * 2 > sampleBuffer.Capacity()) {
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds{1});
|
std::this_thread::sleep_for(std::chrono::milliseconds{1});
|
||||||
}
|
}
|
||||||
|
|
||||||
sampleBuffer.push(frame.data(), frame.size());
|
sampleBuffer.push(frame.data(), frame.size() * 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -276,6 +276,12 @@ namespace Audio {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (int i = 0; i < Audio::samplesInFrame; i++) {
|
||||||
|
auto& mix0 = mixes[0];
|
||||||
|
auto& sample = mix0[i];
|
||||||
|
frame[i] = {s16(sample[0]), s16(sample[2])};
|
||||||
|
}
|
||||||
|
|
||||||
performMix(read, write);
|
performMix(read, write);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue