Commit graph

106 commits

Author SHA1 Message Date
Zach Pomerantz
061668cba4 use lock-free pipe for local audio in device callback 2017-01-22 00:25:08 -05:00
Zach Pomerantz
df051ff8df maintain network audio in int16_t 2017-01-20 18:37:46 -05:00
Zach Pomerantz
bb247fe8a3 rename AudioMixRingBuffer 2017-01-20 14:48:54 -05:00
Zach Pomerantz
5927c089ac use AudioRingMixBuffer as LocalInjectorsStream 2017-01-20 12:29:44 -05:00
Zach Pomerantz
4f7f3c2a60 mv localInjectorsBuffer to float-based localInjectorsStream
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.
2017-01-20 12:29:44 -05:00
Zach Pomerantz
4c7c7ee3cc mv audio injector preparation to own thread 2017-01-20 12:29:44 -05:00
Zach Pomerantz
969d776e1f queue injector audio after device callbacks
Conflicts:
	libraries/audio-client/src/AudioClient.cpp
2017-01-20 12:29:44 -05:00
Zach Pomerantz
dee5f63037 rename audio mix/scratch buffers
Conflicts:
	libraries/audio-client/src/AudioClient.cpp
	libraries/audio-client/src/AudioClient.h
2017-01-20 12:29:44 -05:00
Zach Pomerantz
3a0d874bb5 add injector ring buffer to audio client 2017-01-20 12:29:44 -05:00
Zach Pomerantz
a7ecf41a42 add audio limiting to device callback 2017-01-20 12:29:44 -05:00
Zach Fox
7030c7b0a6 Space bubble improvements (#9142)
* 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.
2016-12-12 14:22:54 -08:00
Ken Cooke
e93e1a7c4f Preliminary support for Ambisonic audio injectors.
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.
2016-12-02 18:20:57 -08:00
Seth Alves
3903a51062 fix a couple of crash-on-exits 2016-10-25 13:58:48 -07:00
Clément Brisset
b63eb6ba9f Merge pull request #8665 from zzmp/feat/audio-stats
move audio stats to QML/JS, with graphs
2016-10-20 16:43:49 -07:00
Clément Brisset
02991bffab Merge pull request #8687 from zzmp/feat/injector-loopback
loopback local injectors on server echo
2016-09-30 11:21:10 -07:00
Zach Pomerantz
768354e49f loopback local injectors on server echo 2016-09-29 15:25:17 -07:00
Ken Cooke
858297241b Even lower audio latency 2016-09-29 12:48:21 -07:00
Zach Pomerantz
b9c4018b8e expose AudioStats to qml/js 2016-09-26 15:35:29 -07:00
Zach Pomerantz
e2ff738fc3 strip unused audio settings
- 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
2016-09-21 17:35:27 -07:00
Ken Cooke
b14f43b11e Merge pull request #8610 from zzmp/test/audio-jitter
add audio jitter simulator testing tool
2016-09-21 16:43:36 -07:00
Zach Pomerantz
177466e4c7 calculate unplayed ms on all streams/buffers as max 2016-09-15 17:54:41 -07:00
Zach Pomerantz
53f5899a69 add audio jitter simulator 2016-09-15 14:51:39 -07:00
Ken Cooke
25920732ec Remove unused buffer 2016-09-14 08:23:53 -07:00
Ken Cooke
f1455ab157 Remove unneeded buffers 2016-09-13 20:06:44 -07:00
Ken Cooke
724df38df0 Optimize the audio pipeline. Use float mixBuffer and apply reverb at 24khz 2016-09-13 16:11:06 -07:00
Zach Pomerantz
e785c0cdf8 add test for audio jitter 2016-09-08 17:50:11 -07:00
Ken Cooke
28a99a7a03 Merge branch 'master' of https://github.com/highfidelity/hifi into low-latency-audio 2016-08-29 12:38:17 -07:00
Ken Cooke
4b2778f02d Re-implement the continuous detection of device changes for all platforms, using a background thread. This prevents the glitches caused by calling checkDevices() on the audio processing thread. 2016-08-20 12:22:47 -07:00
Ken Cooke
3583bdecbb Fix for calculateDeviceToNetworkInputRatio() which was completely broken.
Running the audio back-end at 44.1k now works correctly.
2016-08-18 16:56:26 -07:00
Seth Alves
87dbfa7e47 add -Wsuggest-override to compile flags and deal with fallout 2016-08-18 09:51:41 -07:00
Brad Hefta-Gaub
ca3a194454 implment coded renegotiation in client if for some reason unexpected audio codecs come in to inbound stream 2016-08-02 15:30:03 -07:00
David Kelly
3df373252f Several minor things
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.
2016-07-18 14:00:41 -07:00
Ken Cooke
2674df6095 Fix the distance-attenuation model (for injectors only)
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.
2016-07-14 18:34:07 -07:00
David Kelly
dde4d16759 Merge branch 'master' of github.com:highfidelity/hifi into dk/firstLameAttempt 2016-07-13 15:15:35 -07:00
David Kelly
3955e03aa2 Fix for build error
doh!
2016-07-12 12:15:12 -07:00
David Kelly
80d33ee251 Working now as frame-at-a-time
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).
2016-07-11 09:11:23 -07:00
Brad Hefta-Gaub
ba6bb24595 rework plugins to allow different decoder/encoder instances per streams 2016-07-10 16:49:03 -07:00
David Kelly
600348bf10 Initial cut of htrf for mono localOnly injectors
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.
2016-07-07 16:07:41 -07:00
Brad Hefta-Gaub
9333c7dcca Merge branch 'master' of https://github.com/highfidelity/hifi into codecPlugins 2016-07-06 13:26:19 -07:00
Brad Hefta-Gaub
7a4b11ee97 more work on codecs 2016-06-27 13:06:19 -07:00
Brad Hefta-Gaub
d7bffc3eab first cut at negotiating codecs 2016-06-23 17:14:41 -07:00
Brad Hefta-Gaub
c0be9aec6a cleanup the callers of the resamplers for mic to net and net to speaker, remove loopback resampler 2016-06-23 10:28:29 -07:00
Brad Davis
97e96f7b67 PR comments 2016-03-31 13:19:26 -07:00
howard-stearns
adb33e7dca Up default initial buffer frame size to the value from before. 2016-02-18 16:32:18 -08:00
howard-stearns
d328b82c3c Default output buffer size is 1 frame, and automatic updates don't persist
changes (just in-memory).
2016-02-16 12:09:44 -08:00
Howard Stearns
4255b1f9aa Change output buffer size on correct thread, and turn on automatic resizing on all platforms instead of just mac. 2016-02-16 11:22:01 -08:00
Stephen Birarda
445662f5ae clean sweep of old now unused audio files 2016-02-08 15:38:12 -08:00
Ryan Huffman
89c412c324 Merge branch 'master' of https://github.com/highfidelity/hifi into proto-received-message 2015-12-04 11:38:28 -08:00
Ryan Huffman
07d21514c5 Merge branch 'master' of https://github.com/highfidelity/hifi into proto-received-message 2015-11-19 10:47:37 -08:00
Ken Cooke
998f6e099f Merge branch 'master' of https://github.com/highfidelity/hifi into audio-reverb 2015-11-19 08:39:55 -08:00