Re: The Synthizer Thread

Synthizer's thread safety guarantee is that all calls into synthizer are threadsafe unless otherwise documented, so it's fine, yes.  The Python bindings don't have cases where a python call is more than one C function, so you should be good to have all sorts of fun.

You won't need that thread pool trick yourself long term as Synthizer is going to add it.  But that's a ways off, so you'll want to implement this right.  To do so, you need something called an LRU cache, and to compute the size of the cache as you add to it so that you can keep the decoded assets under an estimated target ram usage.  I would also suggest limiting the thread pool to max(cores/4, 1) which may seem surprising, except that most things for reporting cores will report double the cores the machine actually has due to hyperthreading.  Idk how far you want to go with this yourself, but the Synthizer plan was to allow hinting: you say "I think I'm going to need this asset in the near future", it starts decoding in the background, if you need it before it's done then it blocks on the decoding finishing.

-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
  • ... AudioGames . net Forum — Developers room : ashleygrobler04 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : ashleygrobler04 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : thggamer via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : chrisnorman7 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : chrisnorman7 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : chrisnorman7 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Hijacker via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : chrisnorman7 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Hijacker via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : chrisnorman7 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector

Reply via email to