mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-01-17 20:58:28 +01:00
Some more testing for Super Game Boy audio mixing.
This commit is contained in:
parent
f5d40bd1ee
commit
4ec45a7453
@ -62,7 +62,7 @@ auto ICD::main() -> void {
|
||||
static uint n = 0;
|
||||
float x = sin((2 * 3.141592 * n++ * 1000.0) / 44100.0) * 0.1;
|
||||
apuWrite(x, x);
|
||||
step(128);
|
||||
step(256);
|
||||
return synchronizeCPU();
|
||||
#endif
|
||||
|
||||
@ -149,8 +149,8 @@ auto ICD::power(bool reset) -> void {
|
||||
//SGB1 uses CPU oscillator; SGB2 uses dedicated oscillator
|
||||
create(ICD::Enter, frequency);
|
||||
if(!reset) stream = Emulator::audio.createStream(2, frequency / 128);
|
||||
dsp.stream->reset();
|
||||
icd.stream->reset();
|
||||
//dsp.stream->reset();
|
||||
//icd.stream->reset();
|
||||
|
||||
for(auto& packet : this->packet) packet = {};
|
||||
packetSize = 0;
|
||||
|
@ -35,15 +35,8 @@ auto SMP::waitIdle(maybe<uint16> addr, bool half) -> void {
|
||||
auto SMP::step(uint clocks) -> void {
|
||||
clock += clocks * (uint64_t)cpu.frequency;
|
||||
dsp.clock -= clocks;
|
||||
synchronizeDSP();
|
||||
|
||||
#if defined(DEBUGGER)
|
||||
synchronizeCPU();
|
||||
#else
|
||||
//forcefully sync S-SMP to S-CPU in case chips are not communicating
|
||||
//sync if S-SMP is more than 24 samples ahead of S-CPU
|
||||
if(clock > +(768 * 24 * (int64_t)24'000'000)) synchronizeCPU();
|
||||
#endif
|
||||
synchronizeDSP();
|
||||
}
|
||||
|
||||
auto SMP::stepIdle(uint clocks) -> void {
|
||||
|
Loading…
x
Reference in New Issue
Block a user