History

added support for local audio spatialization independent of inbound audio

ZappoMan committed 12 years ago

Commit b00a67c1 parent ba361b03 files · +140 −72Browse files

Showing the changes to interface/src/Audio.cpp (1 of 3 files). Show all

Unified · Split

interface/src/Audio.cpp+2−0
@@ -665,6 +665,8 @@ void Audio::addReceivedAudioToBuffer(const QByteArray& audioByteArray) { · 664 unmodified lines
665 _lastReceiveTime = currentReceiveTime;665 _lastReceiveTime = currentReceiveTime;
666}666}
667 667
668// NOTE: numSamples is the total number of single channel samples, since callers will always call this with stereo
669// data we know that we will have 2x samples for each stereo time sample at the format's sample rate
668void Audio::addSpatialAudioToBuffer(unsigned int sampleTime, const QByteArray& spatialAudio, unsigned int numSamples) {670void Audio::addSpatialAudioToBuffer(unsigned int sampleTime, const QByteArray& spatialAudio, unsigned int numSamples) {
669 // Calculate the number of remaining samples available. The source spatial audio buffer will get671 // Calculate the number of remaining samples available. The source spatial audio buffer will get
670 // clipped if there are insufficient samples available in the accumulation buffer.672 // clipped if there are insufficient samples available in the accumulation buffer.

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t