The localInjectorsBuffer is based on
AudioRingBuffer, which only accounts for int16_t.
Local injectors are mixed, and so they can exceed
std::numeric_limits<int16_t> before limiting.
This will allow them to remain as float until
limiting (in the device callback) - once the new
stream is implemented.
* The space bubble around a player's avatar is now visualized. When another avatar enters a player's bubble, The bubble visualization will appear, a soft tone will play, and the "Bubble" HUD button will flash.
* The space bubble radius setting has been removed. Space bubble size now scales based on avatar scale.
* Space bubble collision detection is now more accurate and reliable.
* CTRL + N toggles the bubble.
* The "Bubble" HUD button has been moved to the proper location.
Supports 4-channel WAV files, presumed to be B-format (FuMa) first-order Ambisonic.
Supports WAV with arbitrary sample rate (needs optimization).
Supports soundfield volume and orientation set via script.
Supports localOnly client-side injection using simple (non-spatialized) test renderer.
- remove parameters on the jitter buffer algorithm, these are now static
- remove parameters on the output starve detection algorithm, now static
- move interface audio settings to the Developer menu
We could only partially fill the _scratchBuffer - .wav files may not
be exactly N frames long. Doh.
While at it, I needed to call finishLocalInjection() after local
injectors are done, and the access to the injector vector needs to
be locked, given that we do a QtDirectConnection with the networking
and thus the outputLocalInjectors is on a different thread.
The clicking was just 0-ing out the _scratchBuffer.
The original attenuation model seems wrong, under-attenuating at close distance but completely muting after 45m.
This uses a physics-based model of -6dB per doubling of distance in free space, for the injectors. The AudioMixer model and domain settings still need to be reworked in a future PR.
So localOnly sounds get HRTF'd, one network frame at a time. Less
processing (upsampling, limiting, etc...) than doing this at the
end of the pipeline (in the AudioOutputIODevice::readData call).
Probably need to clean up a bit, but wanted to get this out there
for comment on more general issues, etc...
To test, I added a localOnly: true to the cow in the tutorial.