[02:34] *** phe has quit IRC (Quit: Leaving)
[04:38] *** godane has quit IRC (Quit: Leaving.)
[04:38] *** godane has joined #jsmess
[04:52] *** db48x` has joined #jsmess
[04:53] *** db48x has quit IRC (Read error: Operation timed out)
[05:10] *** X-Scale has quit IRC (Quit: HydraIRC -> http://www.hydrairc.com got the sound working for macplus Sierra Boxing game by patching emscripten library_sld.js: https://hastebin.com/uxixirahoz.js
[15:55] and in pce-macplus.cfg set cpu speed = 1
[15:55] it's a bug in empscripten imho
[16:12] Generally? Or in the case of this?
[16:12] Like, is this a sound improvement patch?
[16:36] should work with all, even not PCE based if they request weird sampling rate
[16:37] See the code and the comment which is in library_sld.js 'An implementation must support sample-rates in at least the range 22050 to 96000.' but dunno why they allowed not the range but some discrete value
[16:39] so commenting these line allow any freq < 96000
[16:44] well...if it's not resampling within the range, if what the app supplies is at an in'between value it'll play too fast/pitch shifted
[18:26] why is it using library_sdl.js and not the full SDL port
[18:27] sdl 1.3 vs 2.0
[18:51] I compiled it with SDL2 the other day, but haven't actually done anything with it yet
[18:51] *** db48x` is now known as db48x
[18:53] phe: but I'm also leaning towards setting speed=1
[18:54] phe: coupled with a change to the outer loop that calculates the right number of cycles to execute each time through
[18:54] I suspect some of the performance issues will go away if SDL2 would work
[18:55] but also you can't actually support any sample rate, right?
[18:55] the browser still needs one specific sample rate
[18:55] speed = 0 is likely to ask for trouble
[18:55] we tested for that and set it in the original jsmess loader
[18:56] bai, sure, but what the best path, ask browser to implement the psc with resampling or do it in each emulator needed it?
[18:56] *spec
[18:56] Vito`: the browser can definitely accept a number of different sample rates, all the standard ones
[18:56] it just doesn't do weirdo inbetween ones
[18:56] Vito`: yea, PCE only supports one sample rate, but SDL2 does have SDL_ConvertAudio which I can presumably use
[18:56] look like ff nightly resample correctly for PCE
[18:57] bai: is that recent? they didn't use to
[18:57] yeah, if sdl can't do the conversion or there isn't a library I'd be surprised
[18:57] https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/sampleRate
[18:58] that doesn't list the possible values, hmm
[18:58] I think there's an api call to get a list of sample rates your system supports
[18:58] I think that's different, the audio context use hardware capabilities but the input source can get different sample rate afaics
[18:59] yeah
[18:59] bai: https://github.com/jsmess/jsmess/issues/82
[18:59] https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createBuffer
[18:59] at least in 2014, each browser supported only one sample rate, and you had to deliver audio at that rate for the best quality
[19:00] so we detected it and told mess to output at that, which meant it resampled internally
[19:01] hmm, dunno. I've definitely played around with a variety of different samplerates when doing webaudio stuff, but it's not really my strong suit so maybe this comes in through a different set of nodes than I was working with
[19:05] SDL2 still wants us to resample it, but I can try changing from SDL_OpenAudio to SDL_OpenAudioDevice and asking it not to change the sample rate
[19:06] heh:
[19:06] missing function: SDL_OpenAudioDevice pce-macplus.js:1:3592
[19:12] aha!
[19:12] requested audio format: freq=22255; format=32784; channels=1; samples=512 pce-macplus.js:1:583415
[19:12] obtained audio format: freq=22255; format=32784; channels=1; samples=512 pce-macplus.js:1:583415
[19:13] but then ReferenceError: assignment to undeclared variable SDL2 :P
[19:18] Invalid function pointer '768' called with signature 'vii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this) pce-macplus.js:1:3592
[19:43] https://github.com/db48x/retroweb-pcejs-jsdf/commit/3d39f826c85090b4aa82759020b4ef135fb7a94e
[19:44] I can't figure out the function pointer error
[19:46] * db48x recompiles with -g4
[19:52] somehow that's even less helpful
[20:05] I'm sorry I can't get c in here yet, like azakai indicated
[21:12] *** godane has quit IRC (ny.us.hub ircd.choopa.net)
[21:12] *** balrog has quit IRC (ny.us.hub ircd.choopa.net)
[21:12] *** bai has quit IRC (ny.us.hub ircd.choopa.net)
[21:12] *** zino has quit IRC (ny.us.hub ircd.choopa.net)
[21:12] *** SketchCow has quit IRC (ny.us.hub ircd.choopa.net)
[21:12] *** arkiver has quit IRC (ny.us.hub ircd.choopa.net)
[21:12] *** datajerk has quit IRC (ny.us.hub ircd.choopa.net)
[21:16] *** godane has joined #jsmess
[21:16] *** balrog has joined #jsmess
[21:16] *** zino has joined #jsmess
[21:16] *** SketchCow has joined #jsmess
[21:16] *** arkiver has joined #jsmess
[21:16] *** datajerk has joined #jsmess
[21:16] *** bai has joined #jsmess
[21:16] *** ircd.choopa.net sets mode: +oo SketchCow bai