Re: Gauging interest in another 3d audio project

@51
It very much depends on what you want to do.

If you're talking about these hypothetical buffer functions being used to compute the entire thing ahead of time, Sapi is quite heavyweight and you'll add as much latency as you were trying to get rid of doing it that way.  And amusingly (or not so amusingly) that latency will depend on the length of the string as well.

The only way to do streaming even remotely efficiently is to either have the library call a callback you provide asking you for samples immediately, or for the library to provide a function that blocks until more samples are required.  NVDA does the latter.  It is not feasible to share the thread of your main game loop for this if you want low latency; even with a polling interface, it's not possible to be accurate enough to prevent audio artifacts if you're interleaved with game code and trying to share with game timers.

It's easy enough to provide interfaces for realtime streaming, but it's quite hard, probably impossible, to make them as easy to use as you want them to be.  The problem isn't even exactly performance, it's getting several things to align so that you can get the samples into the right place at the right time without glitching.

But if the right interfaces exist you can in theory even do it from Python, only problem there being the global interpreter lock which can sometimes get in the way, but cython might let you avoid even that and you can embed C code directly with CFFI anyway if you want, so there's ways.

-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
  • ... AudioGames . net Forum — Developers room : NicklasMCHD via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : keithwipf1 via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : keithwipf1 via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : manamon_player via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : manamon_player via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : keithwipf1 via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : keithwipf1 via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector

Reply via email to