Skip to content

Commit

Permalink
Emulator. Reduce audio pops
Browse files Browse the repository at this point in the history
  • Loading branch information
visrealm committed Sep 2, 2023
1 parent b59012c commit 7bf2ff8
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 2 deletions.
Binary file modified emulator/bin/Hbc56Emu.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion emulator/bin/imgui.ini
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ DockSpace ID=0xEBE99B89 Window=0x0F6582BA Pos=0,19 Size=1600,781 Split
DockNode ID=0x0000000C Parent=0x00000005 SizeRef=382,338 Selected=0xDA041833
DockNode ID=0x00000012 Parent=0x00000007 SizeRef=383,259 Split=X Selected=0xDA041833
DockNode ID=0x00000001 Parent=0x00000012 SizeRef=739,208 Split=X Selected=0xEAEE9E08
DockNode ID=0x00000009 Parent=0x00000001 SizeRef=529,191 Selected=0x4A47B9B7
DockNode ID=0x00000009 Parent=0x00000001 SizeRef=529,191 Selected=0xAE489135
DockNode ID=0x0000000A Parent=0x00000001 SizeRef=208,191 Selected=0xEAEE9E08
DockNode ID=0x00000006 Parent=0x00000012 SizeRef=627,208 Split=X Selected=0x600D52CA
DockNode ID=0x0000000F Parent=0x00000006 SizeRef=155,208 Selected=0x600D52CA
Expand Down
11 changes: 11 additions & 0 deletions emulator/src/devices/ay38910_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,17 @@ static void audioAy38910Device(HBC56Device* device, float* buffer, int numSample
}
}
}
else
{
for (int i = 0; i < numSamples; ++i)
{
buffer[i * ayDevice->channels] += ayDevice->buffer[ayDevice->bufferStart];
if (ayDevice->channels > 1)
{
buffer[i * ayDevice->channels + 1] += ayDevice->buffer[ayDevice->bufferStart + 1];
}
}
}
SDL_UnlockMutex(ayDevice->mutex);
}
}
Expand Down
2 changes: 1 addition & 1 deletion emulator/wasm/hbc56.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ var Module = typeof Module != 'undefined' ? Module : {};
}

}
loadPackage({"files": [{"filename": "/rom.bin", "start": 0, "end": 32768}, {"filename": "/rom.bin.lmap", "start": 32768, "end": 83869}, {"filename": "/rom.bin.rpt", "start": 83869, "end": 1080726}, {"filename": "/imgui.ini", "start": 1080726, "end": 1084490}], "remote_package_size": 1084490, "package_uuid": "8528a7ef-cd08-494b-b576-32ba90c43c77"});
loadPackage({"files": [{"filename": "/rom.bin", "start": 0, "end": 32768}, {"filename": "/rom.bin.lmap", "start": 32768, "end": 83869}, {"filename": "/rom.bin.rpt", "start": 83869, "end": 1080726}, {"filename": "/imgui.ini", "start": 1080726, "end": 1084490}], "remote_package_size": 1084490, "package_uuid": "27f885ec-bd96-489f-adfe-e470764e3e04"});

})();

Expand Down
Binary file modified emulator/wasm/hbc56.wasm
Binary file not shown.

0 comments on commit 7bf2ff8

Please sign in to comment.