Commit graph

1186 commits

Author SHA1 Message Date
Zach Pomerantz
3bea1069f2 fix unit conversion for audio fade factor 2016-10-21 16:10:33 -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
Zach Pomerantz
afce8c4a45 STEREO_FACTOR -> AudioConstants::STEREO 2016-10-05 13:02:28 -07:00
Zach Pomerantz
5af95c6062 store channels on audio stream 2016-10-05 12:04:24 -07:00
Zach Pomerantz
05aded5c9d differentiate smaples/frames from dropped audio 2016-10-04 18:45:03 -07:00
Zach Pomerantz
00fabb77b4 use proper audio frame naming 2016-10-04 18:27:56 -07:00
Zach Pomerantz
972a611d03 retain stereo on dead audio resampling 2016-10-04 17:54:20 -07:00
Zach Pomerantz
768354e49f loopback local injectors on server echo 2016-09-29 15:25:17 -07:00
Zach Pomerantz
055fabf57b fix audio AppendFlag semantics 2016-09-26 18:51:51 -07:00
Brad Hefta-Gaub
ee6719f94a Merge pull request #8652 from zzmp/fix/audio-injector
fix injector restart fail on lack of local interface
2016-09-23 16:07:16 -07:00
Zach Pomerantz
912db1c0e1 silence audiostream logging 2016-09-23 15:32:23 -07:00
Chris Collins
be33524990 Merge pull request #8636 from zzmp/clean/audio-config
strip unused audio settings, hide the rest
2016-09-23 15:08:48 -07:00
Zach Pomerantz
faba165408 fix injector fail on lack of local if
- consolidate codepaths for new/restarted injections
- allow network injection without local injection
2016-09-23 15:03:38 -07:00
Zach Pomerantz
09a96796de bring audio stream initializers to standard 2016-09-23 11:58:15 -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
Zach Pomerantz
9e2ec27b29 always play audio injectors locally 2016-09-21 17:20:51 -07:00
Chris Collins
3d9f231543 Merge pull request #8609 from zzmp/fix/audio-stats
fix audio network stats
2016-09-19 09:08:35 -07:00
Zach Pomerantz
b6d093889c add AudioConstants::SAMPLE_SIZE 2016-09-16 14:20:50 -07:00
Zach Pomerantz
0d3a9af6a6 wait 10s before growing jitter 2016-09-16 12:03:54 -07:00
Zach Pomerantz
177466e4c7 calculate unplayed ms on all streams/buffers as max 2016-09-15 17:54:41 -07:00
Zach Pomerantz
9792d025fa clean up audio stats 2016-09-15 13:09:06 -07:00
Ken Cooke
3a41b285a0 Fix local audio injectors, that got disabled somehow 2016-09-13 17:21:48 -07:00
Brad Hefta-Gaub
dbf29ba79d Merge pull request #8569 from jherico/gli
Stuttering: Upgrade GLM & add GLI integration
2016-09-09 12:11:08 -07:00
Brad Davis
ecfe56085d GLM update and GLI integration 2016-09-09 10:18:15 -07:00
Zach Pomerantz
7b8f616099 add audiostream (jitter) logging 2016-09-08 17:23:56 -07:00
Brad Hefta-Gaub
a40a9f1d73 Merge pull request #8575 from kencooke/neon_optimization
Added ARM NEON optimized audio sample rate conversion
2016-09-08 09:58:47 -07:00
Ken Cooke
9457d49103 Merge branch 'master' of https://github.com/highfidelity/hifi into low-latency-audio 2016-09-06 20:56:20 -07:00
Ken Cooke
284bbfdf06 Remove extraneous code 2016-09-06 17:09:59 -07:00
Ken Cooke
b47000eab2 Added ARM NEON optimized audio sample rate conversion 2016-09-06 16:53:06 -07:00
Brad Hefta-Gaub
a51f66e9ff Merge pull request #8553 from zzmp/clean/audio-ring-buffer
clean and comment AudioRingBuffer
2016-09-02 20:16:06 -07:00
Stephen Birarda
dae40c944b fix audio and audio-client compile for android 2016-08-31 16:55:19 -07:00
Zach Pomerantz
4d4a68d706 add FIXME about loudness in AudioRingBuffer 2016-08-31 14:44:45 -07:00
Zach Pomerantz
ba96ab25dc inline some AudioRingBuffer definitions 2016-08-31 14:43:44 -07:00
Zach Pomerantz
b740b9802a clean up AudioRingBuffer 2016-08-31 13:57:56 -07:00
Zach Pomerantz
488f49fc40 rm AudioRingBuffer random access mode 2016-08-31 11:37:05 -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
Seth Alves
722e88253d missed one 2016-08-18 09:59:40 -07:00
Seth Alves
87dbfa7e47 add -Wsuggest-override to compile flags and deal with fallout 2016-08-18 09:51:41 -07:00
Ken Cooke
46c94a938e Updated HRTF to process in 240-sample blocks 2016-08-18 08:29:32 -07:00
Ken Cooke
f80304d68e Change audio pipelines to process in exactly 10ms blocks (240 samples instead of 256).
This produces an integral number of samples when resampled to 44.1k or 48k, allowing a 44.1k back-end to work correctly without extra buffering or dynamic buffers sizes.
2016-08-18 08:27:20 -07:00
Ken Cooke
d9f12e44dc Add resampler support for downsampling with variable-input constant-output buffering mode 2016-08-16 16:47:55 -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
Brad Davis
89d9affb41 Merge remote-tracking branch 'upstream/stable' 2016-07-22 19:47:31 -07:00
David Kelly
3d3a7a8820 Merge branch 'stable' of github.com:highfidelity/hifi into dk/hotfixForAudio 2016-07-22 18:40:06 -07:00
David Kelly
8b8a98bfcc Acutally audio was really broken
Seems there were 2 issues:
* If you couldn't inject locally (say, no audio interface
  because you are an assignment client), we would not do the
  network injection at all.  That's bad.
* When we don't have a codec, like when using an injector, we
  were serializing the empty string in some problematic way.  I
  just use the built-in serialization, and it seems fine.

I tested this by first playing a sound in the console (or maybe you
want to tip some cows, that is ok too).  Then in _another_ interface
client on another machine in the same domain, I better hear the
sound.

Then, I added a script to play audio as a persistent script, which
just loops forever and ever.  You should hear that on both interface
clients also.

A detailed test plan to follow.

Also: using @zappoman serialization code, which is safer than using
the Qt code which does magical things for nulls.  Good to do this cuz
you know, things happen...
2016-07-22 18:33:38 -07:00
David Kelly
4b48cc7c2e Acutally audio was really broken
Seems there were 2 issues:
* If you couldn't inject locally (say, no audio interface
  because you are an assignment client), we would not do the
  network injection at all.  That's bad.
* When we don't have a codec, like when using an injector, we
  were serializing the empty string in some problematic way.  I
  just use the built-in serialization, and it seems fine.

I tested this by first playing a sound in the console (or maybe you
want to tip some cows, that is ok too).  Then in _another_ interface
client on another machine in the same domain, I better hear the
sound.

Then, I added a script to play audio as a persistent script, which
just loops forever and ever.  You should hear that on both interface
clients also.

A detailed test plan to follow.

Also: using @zappoman serialization code, which is safer than using
the Qt code which does magical things for nulls.  Good to do this cuz
you know, things happen...
2016-07-22 17:47:24 -07:00
Brad Hefta-Gaub
bb8224be8c fix silence on no codec after previous codec has been set 2016-07-21 13:57:11 -07:00
David Kelly
7b2d5e7fab Potential cause of that buzzsaw when resetting 2016-07-20 10:41:16 -07:00
Brad Hefta-Gaub
1ee5023f6d fix warnings 2016-07-19 08:33:54 -07:00
Brad Hefta-Gaub
c484fec51d cleanup 2016-07-18 22:54:57 -07:00
Brad Hefta-Gaub
dbf60a594c Merge branch 'master' of https://github.com/highfidelity/hifi into addCodecNameToStream 2016-07-18 22:43:16 -07:00
Brad Hefta-Gaub
c6ffd81c4b some cleanup 2016-07-18 22:42:38 -07:00
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
2a89fa25bb Removing comments
Since I looked into it, seems ok
2016-07-18 16:22:12 -07:00
David Kelly
df615b1503 NotFinished never should have had its own bit
Since there is a Finished flag too.  So now, it is just 0, used as
a starting point, and we check for !hasState(Finished).  <sigh>
2016-07-18 16:02:02 -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
Atlante45
6d1b7f1d37 Wrap sound script object to hold a strong ref 2016-04-06 13:04:18 -07:00
Stephen Birarda
d536026ff4 suppress a couple more noisy messages in AudioRingBuffer 2016-04-05 14:44:20 -07:00
Brad Hefta-Gaub
a3734eba00 Merge pull request #7535 from birarda/suppress-more
add suppression for ring buffer and sequence number messages
2016-04-01 13:04:32 -07:00
Stephen Birarda
5ab59fe770 suppress overflown AudioRingBuffer debug 2016-03-31 17:53:39 -07:00
Zach Pomerantz
9d3abe5513 Release texs when models are cached 2016-03-31 17:02:40 -07:00
Ryan Huffman
99010c7bf6 Fix audio packet being used in a thread-unsafe way 2016-03-21 13:33:56 -07:00
Zach Pomerantz
54af58834a Mark Resource loaded after postprocessing 2016-03-09 10:34:07 -08:00
Ken Cooke
d390c60ef7 CR feedback 2016-03-04 17:11:44 -08:00
Ken Cooke
06bde077b2 Fix compiler warnings 2016-03-01 16:34:58 -08:00
Ken Cooke
b346f36b89 Fix compiler warnings 2016-03-01 14:19:20 -08:00
Ken Cooke
261f5c45de Fix compiler warnings 2016-03-01 12:07:28 -08:00
Ken Cooke
90bf398978 Fix compiler warnings 2016-03-01 10:24:13 -08:00
Ken Cooke
6d9fe967da Fix compiler warnings 2016-03-01 10:16:41 -08:00
Ken Cooke
5043730783 New audio peak limiter library.
Fast lookahead log-domain peak limiter intended to replace all hard-clipping in the audio pipeline.  Converts float audio input (where level may exceed 0dBFS) to 16-bit audio output using very high quality dynamic-range compression and dithering.
2016-03-01 09:13:35 -08:00
Howard Stearns
6a987391d2 Remove debugging code. 2016-02-23 10:55:36 -08:00
Howard Stearns
5d9ee84e63 Extend the test for number of active injectors to apply to injector restarts. 2016-02-23 10:42:39 -08:00
Ken Cooke
aef770fcba fix typo 2016-02-11 16:39:23 -08:00
Ken Cooke
a712222370 fix typos 2016-02-11 16:33:13 -08:00
Ken Cooke
8a49c4b833 use cpuid.h on both GCC and Xcode 2016-02-11 16:09:04 -08:00
Ken Cooke
c4b09c3603 not supported by Clang 2016-02-11 15:15:50 -08:00
Ken Cooke
27494e54c5 use the correct macro for detecting GCC 2016-02-11 12:58:23 -08:00
Stephen Birarda
97cd65cf80 don't use usecTimestampNow for per second actions 2016-02-10 15:07:58 -08:00
Ken Cooke
a875542142 Merge pull request #7053 from birarda/integrate-new-hrtf
Integrate the new audio HRTF in AudioMixer
2016-02-10 07:34:50 -08:00
Stephen Birarda
ac0db04892 repair to wrapped memcpy from AudioRingBuffer 2016-02-09 16:39:22 -08:00
Stephen Birarda
cafcb6b109 remove degree conversion that is not used 2016-02-09 15:25:10 -08:00
Stephen Birarda
5c9f673e38 fix for missing M_PI 2016-02-09 15:05:19 -08:00
Stephen Birarda
7b2726f89b ensure that injectors are cleaned up once inactive 2016-02-09 14:30:59 -08:00
Stephen Birarda
1773233af4 cleanup management of HRTF objects across connected Nodes 2016-02-09 14:30:44 -08:00
Stephen Birarda
a6a694c704 fix mixing bugs post HRTF integration 2016-02-09 11:58:55 -08:00
Stephen Birarda
fd96f0d960 leverage new HRTF in audio-mixer mix preparation 2016-02-08 18:12:25 -08:00
James B. Pollack
ad36e84e24 Merge pull request #7023 from ericrius1/acSoundSearcher
AC Sound Searcher
2016-02-08 17:54:15 -08:00
ericrius1
b60ba0c5a7 can now change loop 2016-02-08 16:22:05 -08:00
Stephen Birarda
445662f5ae clean sweep of old now unused audio files 2016-02-08 15:38:12 -08:00
Ken Cooke
0968118ef7 Removed the commented-out AVX2 detection 2016-02-08 14:51:14 -08:00
ericrius1
bad4a5d601 changed ac script to take into account duration 2016-02-08 12:49:56 -08:00
ericrius1
c169a7cdd5 calculating clip length 2016-02-08 12:36:14 -08:00
ericrius1
6b240dfd5f calculating length of wav file 2016-02-08 12:34:46 -08:00
Ken Cooke
e2066c7719 Disabled AVX support on Mac. XCode is still missing __builtin_cpu_supports (added to Clang in Jul 2015?) 2016-02-06 11:22:19 -08:00
Ken Cooke
3d684dd0e7 Refactor AVX code for separate compilation and runtime dispatch 2016-02-06 10:55:23 -08:00
Ken Cooke
96f1191a97 Compiler fixes 2016-02-05 17:46:26 -08:00
Ken Cooke
7a07e57144 Compiler fixes 2016-02-05 17:27:33 -08:00
Ken Cooke
ad0383114b Compiler fixes 2016-02-05 16:34:04 -08:00
Ken Cooke
1a1b34296c Compiler fixes 2016-02-05 15:44:31 -08:00
Ken Cooke
721fa9d43a HRTF-based audio spatialization engine 2016-02-05 15:24:09 -08:00
Ryan Huffman
4ed38c4104 Merge pull request #6986 from birarda/injector-restart
fix for injector restart not restarting
2016-01-29 16:27:34 -08:00
Stephen Birarda
d7990bf88a reset hasSentFirstFrame to false for double frame on first send 2016-01-29 14:55:08 -08:00
Stephen Birarda
d3028606c5 retart the nextFrame and frameTimer on injector restart 2016-01-29 14:47:27 -08:00
Stephen Birarda
20cfe80036 use a vector instead of priority queue to avoid double sort 2016-01-29 14:04:45 -08:00
Stephen Birarda
8d17df338b allow AIM event processing during repeated injection 2016-01-29 14:04:45 -08:00
Ryan Huffman
c67f39a6c0 Merge pull request #6976 from birarda/injector-dos
fix for overflow on injector playNextFrameAt
2016-01-28 16:37:12 -08:00
Stephen Birarda
0c2805db7e remove debug added to catch injector DOS 2016-01-28 15:50:04 -08:00
Stephen Birarda
311f1ac0e3 fix for overflow on time of next frame 2016-01-28 15:38:33 -08:00
Ryan Huffman
15db8040d8 Merge pull request #6961 from birarda/resampling-error
fix a couple of resampling errors in Sound downSample
2016-01-28 13:22:00 -08:00
Stephen Birarda
79c6ed9739 add some debug for AudioInjector DOS case 2016-01-28 12:22:36 -08:00
Stephen Birarda
0a386cdde8 remove trimFrames call from Sound 2016-01-27 16:10:18 -08:00
Stephen Birarda
dc716461e3 fix for a couple of resampling edge cases 2016-01-27 14:33:03 -08:00
Ryan Huffman
2ec201b85e Fix conversion warning 2016-01-27 14:13:23 -08:00
Ryan Huffman
7e5eec55da Fix non-looped injected audio possibly looping 2016-01-27 13:47:32 -08:00
Ryan Huffman
4de8e7a3c8 Add audio resizing in injector 2016-01-27 13:47:09 -08:00
Ryan Huffman
8764eda479 Merge branch 'master' of https://github.com/highfidelity/hifi into injector-timing-fixes 2016-01-27 11:03:52 -08:00
Ryan Huffman
607f23618d Fix compiler warning for float->int conversion 2016-01-27 10:36:44 -08:00
Ryan Huffman
a3b2dd2295 Add proper loop handling in injector 2016-01-27 10:14:05 -08:00
Stephen Birarda
b6f478e087 add some debug for audio injector wrap case 2016-01-26 13:10:02 -08:00
Ryan Huffman
b56668892e Fix else style 2016-01-26 09:39:11 -08:00
Ryan Huffman
3160aa3068 Change 0LL to INT64_C(0) 2016-01-26 09:36:52 -08:00
Ryan Huffman
5268ef8ac2 Fix else indentation 2016-01-26 09:36:40 -08:00
Ryan Huffman
0e1742588b Fix indentation 2016-01-26 09:35:35 -08:00
Ryan Huffman
641a6e9c30 Fix injector handling for when it falls behind 2016-01-26 09:29:02 -08:00
Stephen Birarda
ba89c8a97a remove some extra debug that isn't needed 2015-12-21 16:23:23 -07:00
Atlante45
b7478c4594 Fix gcc warning 2015-12-11 16:38:19 -08:00
Ken Cooke
86db12acae Fix naming clash with reserved word 2015-12-07 14:03:11 -08:00
Ken Cooke
4803b3bd9f Merge branch 'master' of https://github.com/highfidelity/hifi into audio-reverb 2015-12-07 13:08:21 -08:00
Ken Cooke
8683bb5002 New reverb parameters 2015-12-07 13:05:30 -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
Brad Hefta-Gaub
ab63f19b6a Merge pull request #6546 from kencooke/audio-reverb
Reverb
2015-12-04 10:19:56 -08:00
Atlante45
cd26422ca0 Fix warnings on OS X 2015-12-04 08:47:06 -08:00
Ken Cooke
1d01f08324 Fix compiler warnings 2015-12-03 16:27:35 -08:00
Ken Cooke
fbd7549430 Better reverb script defaults 2015-12-02 11:05:06 -08:00
Ken Cooke
f005afd7c0 Fix stdint.h includes 2015-12-02 09:33:47 -08:00
Ken Cooke
a725c8b12e Merge branch 'master' of https://github.com/highfidelity/hifi into audio-reverb 2015-12-01 09:12:24 -08:00
Clément Brisset
e168966b87 Merge pull request #6409 from birarda/injector-hybrid
more efficient threading of networked AudioInjector objects
2015-11-30 15:36:41 -08:00
Ryan Huffman
1b0413f8e3 Merge branch 'master' of https://github.com/highfidelity/hifi into proto-received-message 2015-11-30 10:23:40 -08:00
Ryan Huffman
99dd9646bc Merge branch 'master' of https://github.com/highfidelity/hifi into proto-received-message 2015-11-30 10:20:13 -08:00
Andrew Meadows
49a6f63663 remove whitespace and fix warning (unused var) 2015-11-30 10:00:05 -08:00
Andrew Meadows
e26081e981 always update physics properties when they change
and move activation check logic to MotionState
2015-11-24 10:20:19 -08:00
Stephen Birarda
c8b5f6f737 fix for top on deque when empty 2015-11-20 16:03:18 -08:00
Stephen Birarda
9ddebc8d13 resolve conflicts on merge with upstream/master 2015-11-20 15:29:44 -08:00
Stephen Birarda
5f9c3eea76 use a priority queue to ensure ordering of injectors 2015-11-19 17:42:14 -08:00
Stephen Birarda
adf41fce19 use alias for unique_lock and mutex 2015-11-19 17:29:20 -08:00
Stephen Birarda
3b56df6e99 use deleteLater immediately not that finish is right thread 2015-11-19 17:27:18 -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
2c98976ef2 Fix bug from implicit cast 2015-11-19 10:05:10 -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
Ken Cooke
2489eaa30e Changed the audio pipeline to allow stereo reverberation, using separate source (loopback audio) and listener (received audio) reverbs. 2015-11-19 08:32:13 -08:00
Ryan Huffman
2a416ebc61 Merge branch 'master' of https://github.com/highfidelity/hifi into received-message 2015-11-18 16:52:23 -08:00
Brad Davis
5b8047ded4 Make recording and playback work in interface, playback in agent 2015-11-18 14:04:45 -08:00
Ken Cooke
cc90662bf0 PR feedback 2015-11-18 12:17:27 -08:00
Ken Cooke
8ae3fa61c5 Fix compiler issues 2015-11-18 10:06:40 -08:00
Ken Cooke
0f214555c1 New algorithmic stereo reverb 2015-11-18 09:13:03 -08:00
Stephen Birarda
2aa56b5384 include memory header for unique_ptr 2015-11-17 17:26:45 -08:00
Stephen Birarda
35dd5fb564 include NLPacket in AudioInjector for unique_ptr 2015-11-17 17:26:07 -08:00
Stephen Birarda
1c485bacff include the condition_variable header in AIM 2015-11-17 17:11:40 -08:00
Stephen Birarda
d20fd6d7e7 cap max to 40, clarify comment 2015-11-17 17:08:48 -08:00
Stephen Birarda
cf2ad9a877 remove atomic include from AudioInjector 2015-11-17 17:07:29 -08:00
Stephen Birarda
62b218632d don't use unneeded atomic for AudioInjector State 2015-11-17 17:06:21 -08:00
Stephen Birarda
8e4d7c69ce handle AudioInjectorManager for scripted ACs 2015-11-17 17:01:11 -08:00
Stephen Birarda
935c0cc137 handle AudioInjectorManager cleanup in Application 2015-11-17 16:39:23 -08:00
Stephen Birarda
ab5c8e072f handle blocked AudioInjectorManager for restart 2015-11-17 16:31:18 -08:00
Stephen Birarda
d764ff2e87 remove static variables in AudioInjector.cpp 2015-11-17 15:12:04 -08:00
Stephen Birarda
7da6ec46c4 more handling of various AudioInjector states 2015-11-17 14:20:59 -08:00
Stephen Birarda
4fa934dccf make sure AudioInjectorManager process is on AI thread 2015-11-16 18:54:16 -08:00
Stephen Birarda
80115d38e9 tweak the AudioInjectorManager for injector threading 2015-11-16 18:53:09 -08:00
Stephen Birarda
aa77c4894c add an AudioInjectorManager for more efficient threading 2015-11-16 16:04:10 -08:00
Stephen Birarda
52716b8f95 emit a ready signal if Sound has downloaded 2015-11-16 10:55:25 -08:00
Atlante45
ffafd3194e Recording audio fixes 2015-11-05 16:46:59 -08:00
Brad Davis
63df9fb959 Fixing raw sound playback and air guitar 2015-10-22 22:37:18 -07:00
Ryan Huffman
9ddcfdf94d Cleanup PacketReceier and ReceivedMessage 2015-10-16 09:21:10 -07:00
Ryan Huffman
7682ab00e3 Add ReceivedMessage and receive progress 2015-10-15 14:09:53 -07:00
Brad Davis
6f5f6450df Cleanup CMake files 2015-10-11 00:01:03 -07:00
Ken Cooke
3555e90cf6 Improved random generator for SIMD dither 2015-10-01 20:32:48 -07:00
Ken Cooke
e1e34b2ce5 Fix to allow arbitrary input/output buffers from caller. SIMD padding is no longer required. 2015-10-01 20:17:04 -07:00
Ken Cooke
4e29d8382d SSE2 optimization of new resampler. 3.5x faster for all modes. Dither is always enabled. 2015-10-01 03:24:10 -07:00
Ken Cooke
aa01dca0a8 Fix compiler warnings 2015-09-27 19:14:31 -07:00
Ken Cooke
7faada24a8 Moved table to the top, so it can be declared static 2015-09-27 15:45:00 -07:00
Ken Cooke
c000c635b1 CR feedback 2015-09-27 15:31:11 -07:00
Ken Cooke
956d83c872 Size optimization of new resampler. Reduced size of precomputed tables by 8x. Even with 32x oversampling of the prototype filter, aliasing from Lagrange interpolation is (12+24/octave) = -132dB which is fine. 2015-09-25 21:28:48 -07:00
Ken Cooke
4a1458e152 Algorithmic optimization of new resampler. All common sample rates now use a rational mode that does direct FIR filtering instead of coefficient interpolation. Complexity reduced by 2x for mono, 1.5x for stereo. 2015-09-25 19:05:55 -07:00
Brad Hefta-Gaub
8a8da58dfd Merge pull request #5898 from kencooke/audio-src
Completely remove SOXR from cmake
2015-09-24 15:59:23 -07:00
Ken Cooke
629ee7b0c1 Completely remove SOXR from cmake 2015-09-24 15:12:10 -07:00
Brad Hefta-Gaub
5e82b9c433 more warning fixes 2015-09-24 08:26:56 -07:00
Ken Cooke
478eab3843 CR feedback 2015-09-23 12:07:17 -07:00
Ken Cooke
4b9c2ed6b6 In AudioInjector, replace SOXR with AudioSRC.
Used for pitch shifting in playSound(). Setup time (once per sound) is drastically improved.
2015-09-22 23:08:05 -07:00
Ken Cooke
b983ba7056 Fix Mac and Linux builds 2015-09-22 08:46:00 -07:00
Ken Cooke
2d1150115f New low-latency sample rate conversion library 2015-09-22 08:14:08 -07:00
Philip Rosedale
b968911fcc Merge pull request #5820 from kencooke/audio-fix
fix audio int16_t to float scaling
2015-09-16 10:26:36 -07:00
Ken Cooke
def24a15ad fix audio int16_t to float scaling 2015-09-16 09:00:41 -07:00
Ken Cooke
ffe3fcf4ce Replace repeated division with multiply by inverse 2015-09-15 10:18:53 -07:00
Ken Cooke
5045f8558e Fix incorrect scale factor for converting int16_t to/from float 2015-09-15 10:08:24 -07:00
Stephen Birarda
ed19987b7d resolve conflicts on merge with upstream/master 2015-09-04 12:31:46 -06:00
Howard Stearns
d003ec9c58 Delete collision sounds (and their threads) after use.
This has been broken ever since I added avatar collision sounds around https://github.com/highfidelity/hifi/pull/5159 or so.
2015-08-31 15:49:17 -07:00
Stephen Birarda
80cf7b6c76 resolve conflicts on merge with upstream/master 2015-08-27 14:50:04 -07:00
Ryan Huffman
aa7d8678e1 Merge branch 'protocol' of github.com:birarda/hifi into atp-server 2015-08-26 12:26:11 -07:00
Seth Alves
695ffa29c7 call setup_memory_debugger from common macros rather than from every CMakeLists.txt file 2015-08-26 11:09:59 -07:00
Atlante45
179ee73e26 Merge branch 'master' of https://github.com/highfidelity/hifi into update_protocol 2015-08-26 16:50:33 +02:00
Brad Davis
d311e4f2ea Fixing problems reported by static analysis tool 2015-08-25 19:18:55 -07:00
Brad Davis
380b0cb23c Removing tabs from our javascript and C++ 2015-08-24 15:26:46 -07:00
Brad Davis
8c7711168c Merge pull request #5603 from sethalves/linux-memory-debugger
memory debugging on linux
2015-08-20 19:19:24 -07:00
Stephen Birarda
e93b360908 expose options property to AI script interface 2015-08-20 12:12:43 -07:00
Seth Alves
c25082d86f use -fsanitize=address in all code rather than just the top-level links 2015-08-20 10:14:16 -07:00
Stephen Birarda
6860f3d126 add readWithoutCopy for clarity in Packet read 2015-08-19 14:32:26 -07:00
Ryan Huffman
5884fcb17b Merge branch 'ordered-sending' into atp-server 2015-08-19 12:23:31 -07:00
Ryan Huffman
4827d326f4 Update ResourceCache to allow multiple downloads on the same resource 2015-08-19 12:11:47 -07:00
Ryan Huffman
ae93d74d8b Update Sound to use new ResourceCache 2015-08-03 16:27:34 -07:00
Stephen Birarda
9e7fb9ae16 shuffle Packet headers, use static enum for PacketType 2015-07-23 13:56:47 -07:00
Stephen Birarda
0177513285 resolve conflicts on merge with upstream/master 2015-07-20 12:29:38 -07:00
Stephen Birarda
1fd4a1f0c3 resolve conflicts on merge with upstream master 2015-07-17 16:07:45 -07:00
Stephen Birarda
331bb54144 remove unused variable 2015-07-17 15:59:39 -07:00
Stephen Birarda
39272652e5 fix seeks in InboundAudioStream 2015-07-17 15:59:24 -07:00
Stephen Birarda
0f534b9f7b fixes for new read and NLPacketList 2015-07-17 15:43:20 -07:00
Howard Stearns
2d277a2abd Fix https://app.asana.com/0/30233891560551/41734486809354/f 2015-07-17 11:28:25 -07:00
Stephen Birarda
e5722098f6 resolve conflicts on merge with upstream/master 2015-07-17 11:06:01 -07:00
Stephen Birarda
a6641908fb check if audio mixer is alive before packet send 2015-07-16 15:49:15 -07:00
Stephen Birarda
c5047ec76d fix sequence number packing for audio injector 2015-07-16 15:47:25 -07:00
Stephen Birarda
333cd77d9c cleanup call to parseAudioData 2015-07-15 17:20:02 -07:00
Stephen Birarda
9318f464a4 fix position of read in InboundAudioStream 2015-07-15 16:42:58 -07:00
Stephen Birarda
273e92f1fd pass correct size for audio read 2015-07-15 16:34:00 -07:00
Stephen Birarda
05dde9d8f5 resolve conflicts on merge with upstream/master 2015-07-15 16:18:47 -07:00
Stephen Birarda
52fdce4a44 fix fromRawData call for silent audio packet 2015-07-15 15:41:45 -07:00
Stephen Birarda
e127c5c06d rename Packet methods for clarity 2015-07-15 10:40:40 -07:00
Atlante45
fbb6a94579 Merge branch 'receive_packets' of https://github.com/huffman/hifi into protocol 2015-07-14 16:36:28 -07:00
Stephen Birarda
fbd287472d make NodeData parseData take only packet 2015-07-14 14:09:00 -07:00
Atlante45
c80df94b06 Update includes for moved files 2015-07-13 15:28:55 -07:00
Stephen Birarda
ede39515d8 update parseData for new network API 2015-07-13 14:26:10 -07:00
Atlante45
957e6394a9 sendPacket function take Node& not a pointer 2015-07-13 11:57:20 -07:00
Atlante45
6c591131ba Made Animations safe for resource reload 2015-07-10 12:01:51 -07:00
Stephen Birarda
a363f42bb2 pass const NLPacket& for all sendUnreliablePacket calls 2015-07-09 11:42:18 -07:00
Stephen Birarda
f3eb6982e6 fix writing to packet in AudioInjector 2015-07-08 16:39:24 -07:00
Atlante45
7329ad6334 Templated read/write in Packet 2015-07-08 13:45:12 -07:00
Atlante45
6bf05fbf1f Pointer fixes 2015-07-08 10:50:51 -07:00
Atlante45
7713219718 Compile fixes 2015-07-08 10:40:35 -07:00
Stephen Birarda
74940a2132 replace lingering PacketTypes in old format 2015-07-08 10:18:13 -07:00
Stephen Birarda
eac3a2a640 packet repairs for AudioInjector 2015-07-07 15:50:32 -07:00
Stephen Birarda
ffa6edc904 fix spaces created by xcode find/replace 2015-07-07 15:01:19 -07:00
Stephen Birarda
e1c098233a use sendUnreliablePacket for repeated send in AI 2015-07-06 18:03:41 -07:00
Stephen Birarda
b3c3e5a6c8 more PacketType to PacketType::Value replacements 2015-07-02 16:49:19 -07:00
Stephen Birarda
0d64e82fe2 replace PacketType declarations with PacketType::Value 2015-07-02 16:38:52 -07:00
Howard Stearns
3b8a46b87d Allow scripted audio injectors to have options set. 2015-06-23 21:01:34 -07:00
Howard Stearns
b506fe0f1d Merge branch 'master' of https://github.com/highfidelity/hifi into refactor-playSound 2015-06-19 14:22:04 -07:00
Howard Stearns
dc10e15e96 Put the common stuff on AudioInjector rather than AudioClient, so that assignment-client (which depends on script-engine) does not need to depend on audio-client. 2015-06-19 14:20:00 -07:00
Seth Alves
b258aeaa3d merge from master 2015-06-18 10:04:14 -07:00
Howard Stearns
b4dfaba55e Incorporate ctrlaltdavid's changes. 2015-06-17 11:59:15 -07:00
Seth Alves
508ae276c6 enable -Wdouble-promotion 2015-06-16 18:23:10 -07:00
Howard Stearns
6d99d50f72 Don't clip local audio sounds (https://app.asana.com/0/32622044445063/37633564937422)
and quiet some warnings (of https://app.asana.com/0/32622044445063/37620738098871).
2015-06-16 10:51:42 -07:00
Howard Stearns
8e41c58fad Merge branch 'master' of https://github.com/highfidelity/hifi into restartable-non-local-sound 2015-06-08 15:45:30 -07:00
Howard Stearns
564b0b48ef Alternate version that uses signal rather than polling. 2015-06-08 14:29:43 -07:00
Stephen Birarda
666830c04d add a sound once first AM packet received 2015-06-08 11:30:12 -07:00
Howard Stearns
6668de56cd Fix AudioInjector::restart() for the non-local case. 2015-06-08 10:34:56 -07:00
Stephen Birarda
6b3cf1ba4a remove dependency of PacketHeaders on NodeList 2015-05-05 12:19:42 -07:00
Stephen Birarda
6cff75f7c1 resolve conflicts on merge with upstream/master 2015-05-04 10:05:44 -07:00
Atlante45
1dcc2f7988 Fix local injector modifying system volume 2015-05-04 15:53:58 +02:00
Stephen Birarda
b9c9ff6a14 clean up various warnings 2015-05-01 16:49:13 -07:00
Stephen Birarda
841da65eaf fix abs value call warning 2015-05-01 16:34:34 -07:00
Stephen Birarda
94739cf8d3 move number constants out of SharedUtil to NumericalConstants 2015-05-01 10:26:53 -07:00
David Rowe
9576ad19a7 Move "Stereo Audio" option into developerMenu.js
And rename it "Stereo Input" to better relect what it does.
2015-04-28 14:14:10 -07:00
Seth Alves
0fb1a83e3b quiet compiler, remove some trailing control-Ms 2015-04-25 09:20:00 -07:00
Atlante45
8f8e4d8dc6 Add generated audio methods to audio interface 2015-04-15 15:49:11 +02:00
Seth Alves
ef5dffecf6 fix filenames in comments 2015-04-07 10:03:14 -07:00
Seth Alves
9014397167 try again without macro 2015-04-07 09:59:04 -07:00
Seth Alves
7af32bd67a put audio and script-engine logging into their own QLoggingCategory 2015-04-06 15:57:18 -07:00
Stephen Birarda
3f079e10aa user AudioConstants for size of int16_t 2015-04-02 11:35:23 -07:00
Stephen Birarda
41290dd3e3 push data pointer for recursive read from front 2015-04-02 11:34:39 -07:00
Stephen Birarda
164c06a190 fix resampled stereo audio array size 2015-04-02 10:41:52 -07:00
Seth Alves
4bf86bb824 another [] needed after delete 2015-03-29 17:59:57 -07:00
Seth Alves
78b46cff2b quiet compiler 2015-03-28 17:11:36 -07:00
Seth Alves
faa3ed6c29 valgrind wants [] 2015-03-28 17:11:23 -07:00
Stephen Birarda
8ede9fb39b fix stereo to stereo resampling 2015-03-10 15:50:30 -07:00
Stephen Birarda
271a4e2cae cleanup some divides for manual sound resampling 2015-03-10 13:04:35 -07:00
Stephen Birarda
dc0ad09953 fix for check of num source samples 2015-03-10 13:04:34 -07:00
Stephen Birarda
7ecde7be30 add fix for out of bounds Sound resampling 2015-03-10 13:04:34 -07:00
Stephen Birarda
b2e587dbbd remove use of include_dependency_includes and use cmake 2015-02-18 14:12:05 -08:00
Stephen Birarda
1f7c3a0eb2 Merge branch 'master' of https://github.com/highfidelity/hifi into dependencies 2015-02-18 09:40:10 -08:00
Stephen Birarda
c110fcbfad merge with upstream/master 2015-02-17 17:34:48 -08:00
Andrew Meadows
505c50ebe1 correct gain variance in linearFade() 2015-02-17 12:07:32 -08:00
Stephen Birarda
e99012efbb updates to build guides to remove soxr 2015-02-17 10:33:12 -08:00
Andrew Meadows
53855c89e9 Merge pull request #4289 from birarda/dependencies
add gverb and glm as cmake external projects
2015-02-17 10:00:29 -08:00
ZappoMan
1fc0225939 change ScriptCache and SoundCache to derive from Dependency 2015-02-13 15:33:41 -08:00
Stephen Birarda
8c998a65ee use the glm find_package and check externals 2015-02-13 12:50:32 -08:00
Stephen Birarda
df8e51f835 use external project glm in more targets 2015-02-13 10:21:21 -08:00
Stephen Birarda
13fc0b1fcd fix AudioInjector debug line to be more clear 2015-02-13 09:36:16 -08:00
Stephen Birarda
5f4e3528c2 override seek to handle warning once stopped 2015-02-12 11:29:55 -08:00
Stephen Birarda
060b0bbfd6 tell injector it is not finished once restarted 2015-02-12 11:13:03 -08:00
Stephen Birarda
ea52cea5dd more cleanup for AudioInjector mem management 2015-02-12 10:56:40 -08:00
Stephen Birarda
43e777163e use a QPointer to trigger delayed delete 2015-02-11 19:15:33 -08:00
Stephen Birarda
79674fb94f use a wrapper on audio injector for script ownership 2015-02-11 17:20:00 -08:00
Stephen Birarda
449719bc7c add option to restart a local audio injector 2015-02-11 16:58:30 -08:00
Stephen Birarda
f9174366dc fixes for new injector API in other scripts 2015-02-11 16:20:48 -08:00
Stephen Birarda
4894a5b414 better handling of cleanup for local injector 2015-02-11 16:11:55 -08:00
Stephen Birarda
0498c5c708 provide old ASI APIs in AudioInjector 2015-02-11 15:57:32 -08:00
Stephen Birarda
7b485829c4 cleanup AudioInjector memory management 2015-02-11 15:52:00 -08:00
Stephen Birarda
219e78425b resolve conflicts on merge with upstream master 2015-02-06 09:49:46 -08:00
Stephen Birarda
c9c53453c3 repairs to local audio injector cleanup 2015-02-04 14:47:18 -08:00
Seth Alves
bcf0846310 merge from master 2015-02-04 11:30:22 -08:00
Seth Alves
a645d784d8 uint32_t rather than uint, which mac doesn't like 2015-02-04 11:26:05 -08:00
Stephen Birarda
11f3161029 resolve conflicts on merge with upstream/master 2015-02-04 10:38:05 -08:00
Atlante45
78a9d002db Remove settings from InboundAudioStream 2015-02-03 12:47:25 -08:00
Atlante45
27459ba861 Settings update 2015-02-03 12:27:30 -08:00