Commit graph

536 commits

Author SHA1 Message Date
Ken Cooke
f445737550
Merge pull request #16040 from kencooke/audio-webrtc-improvements
Better detection of audio clipping during echo cancellation
2019-08-08 09:17:58 -07:00
Ken Cooke
86adc6099b Attempt audio device format with native sample rate and channels forced to 2/1 before failing 2019-08-05 12:14:45 -07:00
Ken Cooke
ccfe6bda63 Detect clipping prior to echo cancellation (overload of the uncancelled raw input will cause echo leakage!) 2019-08-05 10:34:03 -07:00
Seth Alves
27b574cf14 disable webrtc for android 2019-07-30 14:09:34 -07:00
Ken Cooke
8c6cee4e4d Bypass WebRTC processing when not enabled.
Note: WebRTC processing with all features disabled still holds locks and performs resampling in the callback.
2019-07-30 14:09:33 -07:00
Ken Cooke
e6e8491098 Improved WebRTC error reporting 2019-07-30 14:09:33 -07:00
Ken Cooke
bd0849fd4f Allow AEC with device sample rate up to 96KHz 2019-07-30 14:09:32 -07:00
Ken Cooke
5c86c22076 Move WebRTC far-end FIFO into AudioClient.h 2019-07-30 14:09:32 -07:00
Seth Alves
8ec4505b95 add an on/off control for audio echo cancelation to Audio Settings page. It's not yet hooked to anything. 2019-07-30 14:09:32 -07:00
Ken Cooke
569c76c8ba Baseline AEC using WebRTC, always enabled.
Audio streams are hooked as close as possible to device input/output, re-buffering as needed.
2019-07-30 14:09:31 -07:00
Ken Cooke
c3b9e4806a Fix longstanding bug in Audio Scope feature that records output to WAV 2019-07-30 14:09:30 -07:00
Ken Cooke
80aeeaa3e0 Refactor the audio output callback, to expose the final output (far-end) needed for AEC 2019-07-30 14:09:30 -07:00
Seth Alves
32d5ab7b1f Make WebRTC library available 2019-07-30 14:09:30 -07:00
amer cerkic
30e295d1a0 push to talk causes fun, removing tttt 2019-06-20 15:12:20 -07:00
amer cerkic
1218f7e014 moved audioclient stop to dtor 2019-06-20 15:10:21 -07:00
Ken Cooke
a132dad486 On platforms where nativeFormatForAudioDevice() is reliable, do not enumerate formats 2019-06-05 07:03:18 -07:00
Ken Cooke
4a294b3899 Add sanity check for buffer overflow due to resampling 2019-06-01 14:31:14 -07:00
Ken Cooke
a56942e494 Correctly handle time-varying buffer size due to loopback resampling 2019-06-01 14:27:32 -07:00
Ken Cooke
451cf60e54 Reset loopback resampler when input device is changed 2019-06-01 11:04:52 -07:00
Ken Cooke
f7236f0498 Fix bug in local echo when output is multichannel 2019-06-01 10:43:34 -07:00
Ken Cooke
1572c93624 Fix longstanding bug where resampler called with samples instead of frames, resulting in buffer overflow 2019-06-01 09:05:06 -07:00
Ken Cooke
cabe9eab81 Allow local echo when audio input and output devices have different sample rates 2019-05-30 08:59:45 -07:00
Ken Cooke
501ceaa6aa Add lock-free wait for initialization to the audio output callback.
Eliminates race condition without making assumptions about the internal audio threading model.
2019-05-25 10:47:26 -07:00
Ken Cooke
135dc7f2b1 assert() on over-filling the audio callback buffer 2019-05-23 08:54:47 -07:00
Ken Cooke
1b733d3fb3 While PTT is active, duck the audio output by 20dB to reduce echo 2019-05-09 12:56:07 -07:00
Ken Cooke
85f425a93b Apply variable output gain using cubic smoothing 2019-05-09 10:05:02 -07:00
Ken Cooke
85368e6836 Replace inline audio mixing with functions that do gain interpolation 2019-04-01 12:24:37 -07:00
Ken Cooke
abb0a166b1
Merge pull request #15260 from kencooke/audio-mixer-volume-control
Case 21902: System-wide independent volume controls
2019-03-27 13:19:30 -07:00
Seth Alves
5f8139a44c audio-loopback test ignores mute 2019-03-26 16:56:10 -07:00
Ken Cooke
b5e8176b0f
Merge branch 'master' into audio-mixer-volume-control 2019-03-23 16:15:29 -07:00
Ken Cooke
e6c720f793 Add AudioClient mixing gains for local injectors and system sounds 2019-03-22 10:12:31 -07:00
Sam Gondelman
04ecdb463f
Merge pull request #15173 from SamGondelman/audio
Case 21457, Case 16836, Case 15782: Improve AudioInjector threading
2019-03-21 18:03:58 -07:00
SamGondelman
609c4ab52e try to fix audio injector threading issues 2019-03-12 18:41:43 -07:00
Wayne Chen
36c2358dc0
Merge branch 'master' into muteWarningModified 2019-03-11 14:35:13 -07:00
Wayne Chen
4187104b17 culling mute state 2019-03-04 14:12:09 -08:00
Seth Alves
d5e8cba1ee make server-audio-loopback button work in HMDs 2019-03-04 13:47:55 -08:00
Seth Alves
3ecd86caee add a way to disble muted warning from audio panel.
fix positioning of warning.  hide warning when removing timer.
2019-03-04 13:47:55 -08:00
Wayne Chen
7860db68eb culling hearing oneself and testing sound 2019-03-04 13:33:16 -08:00
Seth Alves
9ff99c7213 make server-audio-loopback button work in HMDs 2019-03-04 11:08:07 -08:00
Seth Alves
38256df0f2 add a way to disble muted warning from audio panel.
fix positioning of warning.  hide warning when removing timer.
2019-03-04 11:08:06 -08:00
Ken Cooke
c1786edc24 Emulate the old behavior of _lastInputLoudness 2019-02-21 18:45:17 -08:00
David Rowe
5428bb19dc Add "Avatar Script" JSDoc API classification 2019-02-12 11:49:49 +13:00
Ken Cooke
d014dc2d14 Add audio meter ballistics for less display jitter (10ms attack, 300ms release) 2019-02-07 15:35:20 -08:00
Ken Cooke
2617febbcd Replace ad-hoc audio meter with meter calibrated in dBFS 2019-02-07 15:31:13 -08:00
Ken Cooke
ba00f95f72 Expose clipping status to audio scripting interface 2019-02-06 18:23:50 -08:00
Ken Cooke
918e2fc7ab Proper detection of digital clipping on the unprocessed audio input.
Triggered when 3+ consecutive samples > -0.1 dBFS.
2019-02-06 16:08:30 -08:00
Ken Cooke
f9afe6fe43 Detect loudness and clipping on the raw audio input 2019-02-05 16:39:03 -08:00
Antonina Savinova
5d49a3f6df
Merge pull request #14732 from kencooke/audio-distattn-improvements
Bug fixes and improvements to audio distance attenuation
2019-01-29 14:02:29 -08:00
Ken Cooke
fa08e42da6 Restore legacy attenuation behavior for system sounds and scripts that do not set position.
JS detects when "position" was not set by the script.
C++ explicitly sets .positionSet=false when not set (for system sounds).
Local rendering uses a direct mix (no attenuation/HRTF) when not set.
2019-01-29 11:21:02 -08:00
Ken Cooke
53dece5451 Clamp near-field distance attenuation to max gain 2019-01-03 14:50:44 -08:00