#jsmess 2017-04-06,Thu

↑back Search

Time Nickname Message
00:36 🔗 SketchCow Reading over eating is how I learned about why the British subjugated india
00:37 🔗 SketchCow Spices, baby
00:37 🔗 SketchCow Also, there was a secret spice island
00:38 🔗 bai spices, drugs, and tea - the cornerstones of an empire
00:40 🔗 SketchCow I bet every time db48x reads about the panama canal, he imagines boxes of PCE
00:41 🔗 bai each ship going through the locks is like one simulator cycle being passed through the synchronous processing thread
00:42 🔗 bai the stationmaster has to blow the horn for 30 seconds, and while he's blowing the horn he can't operate the locks, so there's a delay while the sound plays
00:42 🔗 Panasonic has joined #jsmess
00:58 🔗 SketchCow And we're like a bunch of longshoremen running along throwing bricks onto the boats to see if they make it through the locks faster
01:14 🔗 phe has quit IRC (Quit: Leaving)
01:49 🔗 SketchCow I think Dan has (wisely) decided to run off to join the panama canal
02:58 🔗 db48x heh
04:31 🔗 pfalleno1 has quit IRC (Ping timeout: 250 seconds)
08:37 🔗 pfallenop has joined #jsmess
09:01 🔗 pfalleno1 has joined #jsmess
09:01 🔗 pfallenop has quit IRC (Write error: Connection reset by peer)
10:11 🔗 phe has joined #jsmess
13:34 🔗 SketchCow https://lolcommits.github.io/
14:35 🔗 SketchCow https://archive.org/details/softwarelibrary_mac officially has descriptions or has had quality checks for all items.
14:41 🔗 SketchCow So, regarding sound. Are we stalled?
14:41 🔗 SketchCow Do we need to bring in more people to look at it? Or something else?
17:34 🔗 db48x all we need to do is bring in someone who already knows how to fix it
17:38 🔗 Panasonic has quit IRC (Ping timeout: 244 seconds)
18:48 🔗 azakai has joined #jsmess
18:49 🔗 azakai SketchCow: hi
19:04 🔗 SketchCow right on schedule
19:05 🔗 SketchCow alon, we're tryibg to make a javascript emulator not suck at sond.
19:05 🔗 SketchCow sound
19:05 🔗 SketchCow db48x can give some insight
19:06 🔗 SketchCow emulator is at http://archive.org/detaild/softwarelibrary_mac
19:06 🔗 SketchCow details
19:07 🔗 db48x azakai: howdy
19:19 🔗 azakai so i know there is some work on audio workers in browsers, but otherwise I don't think there is much new stuff usable right now
19:19 🔗 azakai the best person to ask about how to optimize sound in the current tech is clb on #emscripten, but he's on vacation atm
19:22 🔗 db48x I'll keep an eye out for him then
19:22 🔗 db48x in the mean time, do you know much about the SDL port?
19:23 🔗 db48x I've not yet looked into how it's implemented, but what we've noticed is that it seems to play the entire sound buffer every frame
19:25 🔗 azakai db48x: sdl1 or sdl2?
19:26 🔗 db48x sdl1
19:27 🔗 db48x but let me double-check that
19:30 🔗 db48x yea, 1.3.0
19:35 🔗 azakai ok, then clb is again the best to ask, as he's worked on it more recently then me. but i did work on it earlier. let me take a look
19:36 🔗 azakai db48x: sdl1 has a few ways to play audio, which api is this using?
19:38 🔗 azakai (raw audio vs an audio file to be decoded)
19:39 🔗 db48x raw audio
19:39 🔗 azakai so Mix_QuickLoad?
19:40 🔗 db48x here's where we open the device: https://github.com/db48x/retroweb-pcejs-jsdf/blob/pcejs-cycles-per-frame/src/drivers/sound/sound-sdl.c#L248
19:41 🔗 azakai or OpenAudio perhaps
19:41 🔗 db48x OpenAudio
19:41 🔗 azakai yeah, openAudio
19:42 🔗 azakai ok, i remember clb rewrote this a lot, to try to optimize it.
19:42 🔗 azakai might be best to read the code inside SDL_OpenAudio in src/library_sdl.js in emscripten. there are a bunch of parameters there like when to queue more to play etc
19:46 🔗 azakai the pushAudio functions etc look like the relevant parts
19:58 🔗 db48x bah, here's something I should have checked earlier:
19:58 🔗 db48x requested audio format: freq=22255; format=32784; channels=1; samples=1024 pce-macplus.js:1:367033
19:58 🔗 db48x obtained audio format: freq=32000; format=32784; channels=1; samples=1024 pce-macplus.js:1:367033
20:01 🔗 db48x I require comestibles; backson
20:03 🔗 Vito` probably a lot of work to convert pce to sdl2 right
20:36 🔗 Ravenloft has joined #jsmess
21:09 🔗 db48x Vito`: no idea
21:09 🔗 db48x Hampa Hug has sent me some helpful emails, however
21:10 🔗 db48x "At every horizontal blank, one byte is read out of the sound buffer and buffered in mac_sound_t.buf[]. At every vertical blank one packet of 370 samples is written to the sound driver using snd_write()."
21:10 🔗 db48x that's how the original hardware worked
21:36 🔗 azakai has quit IRC (Read error: Operation timed out)
21:48 🔗 SketchCow I have one other question which maybe jvilk can answer.
21:48 🔗 SketchCow is it possible to compress the hd images?
21:48 🔗 SketchCow they load in seconds in .gz but 40mb of hard drive is a loy
21:48 🔗 SketchCow lit
21:49 🔗 SketchCow lot.
21:49 🔗 SketchCow and when this is announced, people will go crazy on that one.
21:50 🔗 db48x the ZipFS can't deal correctly when a zip contains only a single file, rather than a directory full of files
21:50 🔗 db48x (or we're using it wrong, of course)
21:52 🔗 SketchCow brb, rachel birthday dinner
21:52 🔗 SketchCow thabks so much for all this work, dan
22:01 🔗 db48x yw
22:01 🔗 db48x enjoy dinner :)
22:09 🔗 bai db48x: wait, really? I thought I'd used single-file zips before
22:10 🔗 bai but, that being said, if the web server is configured properly, it'll be sent gzipped over the wire anyway
22:10 🔗 db48x bai: yep
22:11 🔗 db48x bai: and I've mentioned that before, but somehow IA hasn't fixed it.
22:14 🔗 bai just rename the .img or whatever as .html, maybe it's configured to do that by default :D
22:25 🔗 db48x lol
22:59 🔗 db48x oops, that loop is slightly infinite
23:12 🔗 db48x hrm, not really an improvement: http://erebor.db48x.net:8000/example_macplus.html
23:20 🔗 db48x ok, that's annoying
23:20 🔗 bai which loop are you changing here?
23:22 🔗 db48x in snd_sdl_callback I'm resampling the audio to match what SDL has asked us to output
23:22 🔗 db48x I left in the outer while loop, but didn't decrement cnt
23:29 🔗 bai ah ok. can't we also just tell sdl the format we'll be outputting? or does it only accept one rate?
23:32 🔗 db48x we do tell it what format we want, but it pushes back and tells us what we're allowed to do
23:39 🔗 bai I see
23:40 🔗 db48x so PCE asks for a sample rate of 22255 (yes), and SDL says "well, 32000 would be nicer"
23:40 🔗 bai "look, if you're going to make me run in this weirdo frankenstein environment, the least you could do is speak to me at a rate I can understand"
23:40 🔗 db48x yea
23:40 🔗 db48x I dunno why it doesn't just resample it for us
23:59 🔗 db48x hrm
23:59 🔗 db48x for some reason, I'm getting -32768 every time I read from the source buffer :P

irclogger-viewer