Commit graph

215 commits

Author SHA1 Message Date
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
Brad Hefta-Gaub
20824f038c include codec in audio stream packets so that each side can discard packets that don't match 2016-07-18 21:59:44 -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
Brad Hefta-Gaub
dc2741950a Merge pull request #8259 from kencooke/improved-hrtf
Fix the AudioMixer distance attenuation.
2016-07-15 22:36:51 -07:00
Ken Cooke
1ee608ad2c Cleanup 2016-07-15 18:23:12 -07:00
Brad Hefta-Gaub
878a01cbaf Merge pull request #8242 from kencooke/improved-hrtf
Improved HRTF
2016-07-15 09:02:15 -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
Brad Davis
44500889f8 Remove 'updating reverb' logspam 2016-07-14 13:34:56 -07:00
Ken Cooke
7a4bdc1779 enable in Interface and AudioMixer, by passing distance between source and listener 2016-07-14 11:30:55 -07:00
Ken Cooke
d7399f5781 Improved HRTF.
Adds a distance filter to model the frequency-dependent attenuation of sound propagation in open air.
Optimized using SIMD and computing all biquads in parallel. Performance impact is almost zero.
Filter updates are continuously interpolated and clean to -90dB.

Not enabled yet (distance hardcoded to 0.0f)
2016-07-14 10:34:42 -07:00
Chris Collins
1c6b5e89ac Merge pull request #8239 from ZappoMan/codecPlugins
fix razor blades in your ears when switching between domains with no codecs installed
2016-07-13 17:25:47 -07:00
Brad Hefta-Gaub
a267843e3e fix razor blades in your ears when switching between domains with no codecs installed 2016-07-13 16:37:30 -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
c951f507e3 Fixed issue with calling setOptions
Since the stereo option is computed from the .wav file, if you call
setOptions later (like the cow.js does), it resets stereo to false.
So, I now just copy the stereo flag into the new options, since the
sound file is the same.

Also, calling AudioClient::outputLocalInjector on the AudioClient
thread now to avoid potential concurrency issues accessing the
vector of injectors.
2016-07-13 11:28:36 -07:00
David Kelly
3955e03aa2 Fix for build error
doh!
2016-07-12 12:15:12 -07:00
Brad Hefta-Gaub
71b6210c4e removed some log spam 2016-07-12 10:18:37 -07:00
David Kelly
c84ef5f626 Stereo injectors now handled same as mono
Except of course no HRTF.
2016-07-11 11:31:47 -07:00
David Kelly
4f80c77b77 PR feedback
simple enough - not sure why I had an issue with this in the first
place.
2016-07-11 10:36:55 -07:00
David Kelly
46dc5bea04 cleanup from PR comments 2016-07-11 09:31:05 -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
ed9715ae5f some cleanup, proper memory allocation/deallocation 2016-07-10 17:40:58 -07:00
Brad Hefta-Gaub
ba6bb24595 rework plugins to allow different decoder/encoder instances per streams 2016-07-10 16:49:03 -07:00
Brad Hefta-Gaub
a71baf5601 handle codec prioritization, handle multiple codec choices 2016-07-08 21:18:03 -07:00
Brad Hefta-Gaub
126e5c2926 codec pipeline working, zlib example 2016-07-08 14:34:44 -07:00
David Kelly
bc7123d701 comment out logging for now 2016-07-08 13:59:49 -07:00
David Kelly
7a9b3978e9 Better processing of audio
A couple things Ken suggested.  First off, there are now AudioSRC
calls for floats, which simplfied stuff a bit.  Then, I switched to
grabbing network packets first, and only pulling at most that amount
of audio from the local injectors.  That improves things - the
occasional artifacts (when the injectors got more data than the
network for instance) are gone.

Also, fixed build issue (unused variable warning) for mac and android.
2016-07-08 13:01:06 -07:00
Brad Hefta-Gaub
3c6447326e more codec plumbing 2016-07-07 21:24:24 -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
6111e4952a fix comments 2016-06-23 10:59:26 -07:00
Brad Hefta-Gaub
be37921845 first cut at codec plugins 2016-06-23 10:42:02 -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
Brad Hefta-Gaub
2381ab1cba Merge pull request #7496 from kencooke/master
make self-reverb depend on wetDryMix
2016-03-30 15:44:20 -07:00
Ken Cooke
a51cc9d12a make self-reverb depend on wetDryMix 2016-03-28 16:04:45 -07:00
Atlante45
92ef8cafb1 Make sure pos/rot getters don't crash 2016-03-28 14:37:06 -07:00
Ken Cooke
c6ca984782 Fix Reverb Zone settings to work correctly with new reverb. 2016-03-24 12:59:52 -07:00
Brad Hefta-Gaub
bb1ed2147f revert change that trusted Qt's claim that it supports the format 2016-02-22 11:22:03 -08:00
howard-stearns
e21d9042d0 Remove some logging. 2016-02-19 13:34:06 -08: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
162be13914 Don't keep adding signal connections. More logging. 2016-02-18 16:14:03 -08:00
howard-stearns
547d3d6b9a Merge branch 'audio-output-buffer' of https://github.com/howard-stearns/hifi into audio-output-buffer 2016-02-17 13:57:21 -08:00
howard-stearns
b8b1565470 Don't fake-fail the format test. Trust the os. 2016-02-17 13:46:48 -08:00
Howard Stearns
983a0ccb9b Change internal preference names so that old users pick up the new default values, and change name in dialog. 2016-02-16 18:00:39 -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
Atlante45
ce51350b65 Fix warnings on windows 64bit 2015-12-11 15:42:15 -08:00