mirror of
https://github.com/holub/mame
synced 2025-04-19 15:11:37 +03:00
js_sound.js: fix sound level default for underrunning case (#11317)
This commit is contained in:
parent
d7551fdb69
commit
c2a516abd4
@ -1180,6 +1180,14 @@ project "bx"
|
||||
|
||||
configuration { }
|
||||
|
||||
if _OPTIONS["targetos"]=="macosx" or _OPTIONS["targetos"]=="linux" or _OPTIONS["targetos"]=="windows" or _OPTIONS["targetos"]=="asmjs" then
|
||||
if _OPTIONS["gcc"]~=nil and (string.find(_OPTIONS["gcc"], "clang") or string.find(_OPTIONS["gcc"], "asmjs")) then
|
||||
buildoptions_cpp {
|
||||
"-Wno-unused-private-field",
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
includedirs {
|
||||
MAME_DIR .. "3rdparty/bx/include",
|
||||
MAME_DIR .. "3rdparty/bx/3rdparty",
|
||||
|
@ -173,10 +173,11 @@ function tick (event) {
|
||||
start = 0;
|
||||
}
|
||||
}
|
||||
//Pad with silence if we're underrunning:
|
||||
//Pad with latest if we're underrunning:
|
||||
var idx = (index == 0 ? bufferSize : index) - 1;
|
||||
while (index < 4096) {
|
||||
buffers[0][index] = 0;
|
||||
buffers[1][index++] = 0;
|
||||
buffers[0][index] = buffers[0][idx];
|
||||
buffers[1][index++] = buffers[1][idx];
|
||||
}
|
||||
//Deep inside the bowels of vendors bugs,
|
||||
//we're using watchdog for a firefox bug,
|
||||
|
Loading…
Reference in New Issue
Block a user