diff options
Diffstat (limited to 'src/osd/modules/sound/js_sound.js')
-rw-r--r-- | src/osd/modules/sound/js_sound.js | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/osd/modules/sound/js_sound.js b/src/osd/modules/sound/js_sound.js index b06cbb44365..90756018a05 100644 --- a/src/osd/modules/sound/js_sound.js +++ b/src/osd/modules/sound/js_sound.js @@ -185,18 +185,18 @@ function get_context() { }; function sample_count() { - //TODO get someone to call this from the emulator, - //so the emulator can do proper audio buffering by - //knowing how many samples are left: - if (!context) { - //Use impossible value as an error code: - return -1; - } - var count = rear - start; - if (start > rear) { - count += bufferSize; - } - return count; + //TODO get someone to call this from the emulator, + //so the emulator can do proper audio buffering by + //knowing how many samples are left: + if (!context) { + //Use impossible value as an error code: + return -1; + } + var count = rear - start; + if (start > rear) { + count += bufferSize; + } + return count; } return { |