Commit graph

832 commits

Author SHA1 Message Date
Brad Hefta-Gaub
2e63aba8c9 when getting unexpected codec in the mixer, send a message to the client to select a different codec 2016-07-18 22:29:05 -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
8c0eb1e4d2 Fixed some bad logic
When I "fixed" my or instead of and issue, I did it in the wrong
direction.  But it looked right :)  Now it is.  Sigh.  Long story
how it got there, but it seems good now.
2016-07-15 19:48:15 -07:00
David Kelly
fb99828e30 PR feedback
Code a bit more readable.  Sadly (and I guess it makes sense), a
enum class XXX is not a class, so you cannot have member functions
for it.  I can imagine no way to have a vtable if you are really
representing it as a uint8_t or whatever.  So, I put a stateHas
function in the AudioInjector instead.  Definite improvement.
2016-07-15 17:09:27 -07:00
David Kelly
8df4ed01d9 fixed typo
which oddly I was sure I already did.  Seems I didn't push it?  OK
now it is pushed.
2016-07-15 16:22:41 -07:00
David Kelly
0fcc427d41 Merge branch 'master' of github.com:highfidelity/hifi into dk/localNoEcho 2016-07-15 11:01:42 -07:00
David Kelly
e1212c54cb Updated to deal with streaming out of both buffers
So gotta keep track of when finished streaming to network and
locally separately.  That means the State needed to be more of a
bitflag and less of an enum.
2016-07-15 09:55:50 -07:00
Ken Cooke
d84c7524bf Remove global HRTF headroom.
The initial HRTF reduced overall gain by -6dB to avoid clipping at spectral peaks. With the addition of a peak limiter, this is no longer necessary. Changing to 0dB improves the loudness match between spatialized and unspatialized sounds.
2016-07-14 14:56:58 -07:00
Ken Cooke
fa55fc84f5 Optimized compute of distance filters using log-quantized lookup tables.
Magnitude error < 0.25dB for entire parameter space.
2016-07-14 12:04:05 -07:00
Ken Cooke
c7c02d7a59 Fix compiler warning 2016-07-14 11:24:48 -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
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
Brad Hefta-Gaub
ceffa219b3 support for lost packets 2016-07-11 15:18:02 -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
46dc5bea04 cleanup from PR comments 2016-07-11 09:31:05 -07:00
Brad Hefta-Gaub
7d608ba592 groundwork for injector support 2016-07-10 21:01:20 -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
Brad Hefta-Gaub
3c6447326e more codec plumbing 2016-07-07 21:24:24 -07:00
David Kelly
6cc085b48e Merge branch 'master' of github.com:highfidelity/hifi into dk/firstLameAttempt 2016-07-07 16:15:20 -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
Ken Cooke
f43c6447e1 remove unneeded #pragma 2016-07-03 11:46:23 -07:00
Ken Cooke
014f6fa259 PR feedback: better naming of convertInput() and convertOutput() 2016-07-03 11:40:32 -07:00
Ken Cooke
f7c9957bb1 PR feedback: better naming of convertInput() and convertOutput() 2016-07-03 11:33:05 -07:00
Ken Cooke
941067b9d0 Added floating-point audio reverb 2016-07-02 07:25:04 -07:00
Ken Cooke
ad8f17a142 Add support for deinterleaved float-point audio (native format) 2016-07-01 19:29:43 -07:00
Ken Cooke
d3c006b5da Added floating-point audio resampler 2016-07-01 18:50:53 -07:00
Ken Cooke
dd0d594524 cleanup 2016-06-09 16:31:09 -07:00
Ken Cooke
d7079fce8c Use shared CPUDetect.h for CPU detection 2016-06-09 15:07:24 -07:00
Ken Cooke
14b51d6615 Use common code for AVX detection 2016-06-07 06:50:38 -07:00
Ken Cooke
b60b9bb312 compiler fixes for GCC/clang 2016-06-06 14:54:15 -07:00
Ken Cooke
8faaa36913 moved table of precomputed data into AudioSRCData.h 2016-06-06 12:05:48 -07:00
Ken Cooke
4f35d3df02 AVX2 code must be in /avx for CMAKE to compile it properly 2016-06-06 11:57:17 -07:00
Ken Cooke
34f46b860b AVX2 optimized audio resampler 2016-06-06 11:54:18 -07:00
Ken Cooke
89bfa5bc09 fixed typo 2016-06-03 19:22:29 -07:00
Ken Cooke
280289045c Revert change to reverb settings. 2016-06-03 18:48:23 -07:00
Ken Cooke
cd29aac185 Merge branch 'master' of github.com:kencooke/hifi 2016-06-03 18:42:30 -07:00
Ken Cooke
54293fdad0 Replace the linear interpolation embedded in the .WAV/.RAW loader with high quality polyphase resampling.
When downsampling 48khz to 24khz, linear interpolation creates aliasing distortion that is quite audible.  This change greatly improves the audio quality for all sound assets.
2016-06-03 18:39:43 -07:00
Brad Hefta-Gaub
1e7cd06d0e add audio peak limiter to audio mixer 2016-05-28 20:34:27 -07:00
Ken Cooke
9f6e971839 Default to darker reverb settings, by increasing the high-frequency rolloff and damping. 2016-05-25 07:24:34 -07:00
Seth Alves
40e862cf9e quiet gcc 5 warnings 2016-05-21 16:53:01 -07:00
Zach Pomerantz
09d879e19f Remove delayLoad 2016-05-09 18:09:48 -07:00
Atlante45
07adef9465 Fix entities collision sounds 2016-05-05 14:55:28 -07:00
Atlante45
96ee33e80e Fix avatars collision sounds 2016-05-05 14:55:28 -07:00
Stephen Birarda
93cf5a1035 fixes for CR comments 2016-04-18 16:53:02 -07:00
Zach Pomerantz
bb02af793c Name exposed cache objects 2016-04-14 17:00:18 -07:00
Brad Hefta-Gaub
4f1de77946 Merge pull request #7581 from birarda/suppress-more
suppress a couple more noisy messages in AudioRingBuffer
2016-04-06 19:08:23 -07:00