Commit graph

634 commits

Author SHA1 Message Date
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
Revofire
47af406440 merged 0.80.0-kasen into 0.81.0-kasen, 0.81.0-kasen source ready for build.
various changes, idk, added a whitelist filter to ent script filter
2019-05-01 22:13:51 -04: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
Ken Cooke
5148b60c73 Parameterize distance attenuation by reference distance (where gain = unity) 2019-01-03 14:43:15 -08:00
Ken Cooke
fdd86876cb Fix the distance attenuation of stereo local injectors 2019-01-03 08:17:28 -08:00
Seth Alves
fac27553d7 suppress 'No instance available' messages during shutdown. try a different way of shutting down AudioClient. 2018-11-27 17:02:48 -08:00
Sam Gondelman
f68706e72f
Merge pull request #14252 from gcalero/enable_aec_by_default
Enabled AEC by default (bug 19210)
2018-11-12 16:15:33 -08:00
Clement
8f763dfd50 Fix bug and crash in solo logic 2018-11-07 17:46:18 -08:00
Clement
65a83cb026 Resend solo nodes on mixer reconnect 2018-11-07 11:41:04 -08:00
Clement
37c69ebe62 Add audio soloing feature 2018-11-05 19:02:26 -08:00
Gabriel Calero
58c135a74d Merge remote-tracking branch 'upstream/master' into enable_aec_by_default 2018-11-05 11:25:09 -03:00
Seth Alves
4d34b12f06 rather than do checkDevices to find new audio devices every 2 seconds, do each check 2 seconds after the previous one has completed. This is done to avoid swamping the thread pool when the check takes a long time 2018-10-24 14:00:23 -07:00
Gabriel Calero
5a8a5bbc55 Set AEC enabled by default 2018-10-22 18:18:16 -03:00
John Conklin II
19438d143e
Merge pull request #14073 from jherico/fix/18069_test
Working on Vive shutdown issues
2018-09-25 15:41:32 -07:00
Brad Davis
15de0590e8 Cleaning up commented out code 2018-09-25 13:18:49 -07:00
Brad Davis
72fc686ec1 Fix timer managmement during shutdown 2018-09-24 14:52:13 -07:00
John Conklin II
a602bff217
Merge pull request #13981 from gcalero/android_settings
Android settings (AEC)
2018-09-24 13:55:30 -07:00
Gabriel Calero
1215ddbe88 Remove debug files from linux qt build. Remove extra space 2018-09-13 18:50:46 -03:00
Gabriel Calero
2943502c9b Headset plug/unplug detection 2018-09-12 16:36:04 -03:00
Dante Ruiz
b665dbe13e finished requested changes 2018-09-11 14:18:12 -07:00
Dante Ruiz
5c9a88868d first round of requested changes 2018-09-11 12:01:55 -07:00
Gabriel Calero
2d2a4804f7 Add android settings screen. Add AEC setting 2018-09-06 17:49:52 -03:00
Dante Ruiz
db3d3d3d93 Merge branch 'master' of github.com:highfidelity/hifi into interstitial-final-page 2018-08-21 09:56:59 -07:00
John Conklin II
1edf1b4337
Merge pull request #13555 from SamGondelman/destroy
Trying to fix dependency shutdown
2018-08-16 13:14:58 -07:00
Gabriel Calero
4b808fe38e Revert "Test if this fixes the choppy audio"
This reverts commit 2e323efe1b.
2018-08-13 18:29:05 -03:00
Gabriel Calero
2e323efe1b Test if this fixes the choppy audio 2018-08-10 18:57:41 -03:00
Gabriel
cb215d3190
Set audio buffer size to 20 ms for android
CALLBACK_ACCELERATOR_RATIO = 0.5
2018-08-07 11:49:56 -03:00
Gabriel
5bb9accd30
Fix low volume issue in Samsung
Make Qt use QT_ANDROID_PRESET_VOICE_RECOGNITION device in order to set SL_ANDROID_RECORDING_PRESET_VOICE_RECOGNITION in OpenSL ES
2018-08-07 10:57:51 -03:00
Dante Ruiz
b9cfbfb3be adding interstitial page file to default sctipts 2018-08-03 09:59:21 -07:00
Dante Ruiz
048196ec6f disble sending avatar and audio packets during interstitial mode 2018-08-02 11:39:06 -07:00
Gabriel
f0d058cb61
Set buffer to 10 ms for android (CALLBACK_ACCELERATOR_RATIO = 1.0) 2018-08-02 11:29:56 -03:00
SamGondelman
8a9c27ed92 Merge remote-tracking branch 'upstream/master' into destroy 2018-08-01 16:07:48 -07:00
Gabriel
687f5e3df3
Update AudioClient.cpp
Trying 40ms
2018-08-01 19:49:04 -03:00
Dante Ruiz
0b7d6cb720 start interstitial page work 2018-07-31 14:10:19 -07:00
Gabriel Calero
b841a5f016 Test 3: input sample rate: 24khz. Set CALLBACK_ACCELERATOR_RATIO = 2.0 for android (master version) 2018-07-31 16:54:20 -03:00
Gabriel Calero
b8bab858d9 Test 2: input sample rate: 24khz. Set CALLBACK_ACCELERATOR_RATIO = 0.5 for android 2018-07-31 15:32:39 -03:00
Gabriel Calero
f98c19fd1d Test 1: restore input sample rate to native (48khz) and set CALLBACK_ACCELERATOR_RATIO = 1 for android 2018-07-31 15:15:21 -03:00
Gabriel Calero
f24cfebe88 Revert "Add logs to debug. Revert later"
This reverts commit 3c49e7783c.
2018-07-24 14:57:48 -03:00
Gabriel Calero
3c49e7783c Add logs to debug. Revert later 2018-07-23 14:03:58 -03:00
Gabriel Calero
00e3de4e0a Revert output sample rate to native rate 2018-07-19 19:13:28 -03:00
Gabriel Calero
988acdb3f9 Set output sample rate at 24000 (with testing purposes only) 2018-07-19 18:53:03 -03:00
Gabriel Calero
d230a634b2 Fix connects. Set down MIN_READS_TO_CONSIDER_INPUT_ALIVE to 10 2018-07-19 14:50:40 -03:00
Gabriel Calero
c8a168c273 Fix audio choppy. 2018-07-18 18:36:03 -03:00
Gabriel Calero
d8af12152b Add comment to explain the workaround 2018-07-18 18:35:47 -03:00
Gabriel Calero
e039ef1729 Use 24000Hz sample rate for Samsung only 2018-07-18 18:35:36 -03:00
Gabriel Calero
c11f4be5c1 Make louder android mic 2018-07-18 18:35:21 -03:00
SamGondelman
7954865141 trying to fix dependency shutdown 2018-07-05 14:34:37 -07:00
Atlante45
4a4c0d132e Make stereo interface async 2018-06-18 17:26:29 -07:00
Atlante45
29ff47c6fb Ensure audio devices are made on the right thread 2018-06-18 16:28:52 -07:00
Clement
da9fb9c751 Fix non self-sufficient headers 2018-05-04 16:26:41 -07:00
David Rowe
2cc3ed6287 List which contexts each namespace and object is available in 2018-04-28 20:00:28 +12:00
David Rowe
08dc9b133f Docs to JSDoc review 2018-04-26 21:10:28 +12:00
MiladNazeri
0f87e53902
Merge pull request #12963 from MiladNazeri/docs/DocsToJSDocsUpdate
Docs/docs to js docs update
2018-04-25 12:26:19 -07:00
milad nazeri
23d07fa292 fixed spacing issue 2018-04-24 13:14:55 -07:00
milad nazeri
1121fe8da0 fix tabs 2018-04-23 21:47:53 -07:00
milad nazeri
4ac06fe99f Updating previous jsdocs 2018-04-22 22:22:33 -07:00
milad nazeri
e9b9c05b5d removed cruft 2018-04-22 08:51:47 -07:00
SamGondelman
3b4b43cf66 try to fix audio crash on startup 2018-04-20 10:23:47 -07:00
Ken Cooke
bcf893db18
Merge pull request #12586 from kencooke/audio-peakmeters-fix
Fix crash when closing the Audio menu
2018-03-13 07:52:37 -07:00
Dante Ruiz
3a39fca268 made requested changes 2018-03-09 10:09:51 -08:00
Dante Ruiz
c49d0557fc fixing check box issues 2018-03-09 09:29:37 -08:00
Ken Cooke
91b7acec1f Fix crash when closing the Audio menu. On some machines, checkPeakValues takes long enough that timer callbacks overlap and activeClients gets clobbered while in use. 2018-03-07 11:06:53 -08:00
John Conklin II
7bc3848c36
Merge pull request #12533 from druiz17/stereo-checkbox
Adding Stereo checkbox in Audio settings
2018-03-05 12:45:01 -08:00
Dante Ruiz
55d8cfd4c1 make sure dont make audio devices that don't use stereo use stereo 2018-03-02 10:56:44 -08:00
Sam Gateau
88ecfe7895
Merge pull request #12464 from jherico/android_dev
Android Master
2018-03-01 17:22:34 -08:00
Ken Cooke
bb2f3cac2c Use named constant for the onset of near-field corrections (1 meter) 2018-02-27 08:51:55 -08:00
Ken Cooke
f25b8e8df0 Refactor distance attenuation for near-field HRTF.
Adds near-field attenuation from 0.125m to 1m, calibrated to 0dB at 1m. Overload will trigger dynamic range compression at the peak-limiter.
2018-02-22 16:05:01 -08:00
Gabriel Calero
a2f6548d1d Make slot declarations non-conditional 2018-02-12 13:45:56 -03:00
Gabriel Calero
a91118027d Remove dead code and extra logs 2018-01-26 18:14:43 -03:00
Gabriel Calero
ed1abb3a41 Restoring adaptive audio buffer management 2018-01-15 18:30:32 -03:00
Gabriel Calero
f889782250 Merge remote-tracking branch 'github/android' into android_audio_fixes 2018-01-15 18:28:31 -03:00
Cristian Luis Duarte
21f1c0e275 Android: Make audioInputStateChanged watcher work so it can restart input audio if it stops without a reason. Implement a mechanism that counts last reads in an interval and restart input audio in case of low reads -in these cases (happens particularly on Huawei) there is no call to the audioInputStateChanged method- (Android only) 2018-01-13 06:42:16 -03:00
Ken Cooke
dfc8c86571 Fix bug when calling switchOutputToAudioDevice() with the active device.
Pass QAudioDeviceInfo by value to avoid getting clobbered.
2018-01-11 18:22:34 -08:00
Ken Cooke
db6e70cb24 Fix bug when calling switchInputToAudioDevice() with the active device.
Pass QAudioDeviceInfo by value to avoid getting clobbered.
2018-01-11 18:14:16 -08:00
Ken Cooke
7c5085bd24 Handle stereo changes while active, by restarting the codec on both ends 2018-01-11 16:10:50 -08:00
Ken Cooke
6a2e3cc272 Enable stereo codecs for AvatarAudioStream 2018-01-10 15:14:18 -08:00
Ken Cooke
660032d8fb Fix bug in how emitAudioPacket() determines mono/stereo.
Compressed bytes were counted as if audio samples.
2018-01-10 06:54:27 -08:00
luiscuenca
8abe8b9879 move save logic to audioclient 2017-12-05 18:22:14 -08:00
luiscuenca
20d6615417 emit only when recording 2017-12-05 16:13:44 -08:00
luiscuenca
4030688e7a added record wav files 2017-12-03 11:54:37 -07:00
luiscuenca
027d2d323c Measure tool and corrections 2017-11-26 22:28:34 -07:00
Bradley Austin Davis
e42068f681 Merge branch 'master' into android_new 2017-09-26 14:31:29 -07:00
Bradley Austin Davis
b93e91b9f3 New android toolchain 2017-09-19 13:45:12 -07:00
vladest
6c32783a09 Merge branch 'master' into audio_devices_split 2017-09-19 17:43:03 +02:00
Brad Hefta-Gaub
c5098abfb9 Merge pull request #10937 from kencooke/zzmp-audio/peak-values
Add peak values for all input devices in selection dialog
2017-09-07 11:58:50 -07:00
vladest
6f0229f450 Reworked according to designers request. Do not fall back to default audion output 2017-08-22 23:26:27 +02:00
Ken Cooke
ee752df653 fix typo 2017-08-09 20:11:52 -07:00
Ken Cooke
bcdf13c59c Add explicit shutdown request, since null device means something else 2017-08-09 19:40:07 -07:00
Ken Cooke
ee6d4dfc14 If real input device fails to start, use dummy input 2017-08-09 17:50:20 -07:00
Ken Cooke
fc5b4be459 bugfix 2017-08-09 16:59:02 -07:00
Ken Cooke
9c6b7306c4 Re-implement callback to Use common handleAudioInput() 2017-08-09 16:58:12 -07:00
Ken Cooke
7daa3ecff3 Handle dummy input callbacks 2017-08-09 15:54:14 -07:00
Ken Cooke
6f2cc9cfeb When no input device, create dummy input to generate callbacks 2017-08-09 14:01:17 -07:00
Brad Davis
1ecca9fd29 Merge branch 'master' into zzmp-audio/peak-values 2017-08-06 17:21:00 -07:00
Ken Cooke
6ea4ed80cd Suppress initial PacketType::SilentAudioFrame on audio gate startup 2017-08-03 09:19:08 -07:00
Brad Davis
9f13533560 Ensure input and output device containers are protected by mutex 2017-07-18 08:58:17 -07:00
Seth Alves
972dc4d1b2 more const ref 2017-07-11 19:56:34 -07:00
Seth Alves
c52e7e180a use const AudioInjectorPointer& in some places 2017-07-11 19:42:03 -07:00
Seth Alves
3670a04d8e switch bare pointers to AudioInjector objects to be QSharedPointers 2017-07-11 14:24:58 -07:00
Ken Cooke
d6eb731f3a Merge branch 'master' into audio/peak-values 2017-07-10 21:55:11 -07:00
Brad Davis
8372d73fec Additional thread safety 2017-06-30 09:15:06 -07:00
Brad Davis
b52dd7b822 Don't use blocking connections on the main thread 2017-06-29 20:45:17 -07:00
Zach Pomerantz
ed49f80322 fix peak check secs->msecs 2017-06-29 17:32:52 -04:00
Ken Cooke
0dbb7a71f3 CR fix: comments instead of ref code 2017-06-28 11:32:24 -07:00
Zach Pomerantz
3f57e5eb4d implement peakValueListChanged 2017-06-27 17:51:44 -04:00