Showing the changes to interface/src/Audio.cpp (1 of 3 files). Show all
Unified · Split
| @@ -665,6 +665,8 @@ void Audio::addReceivedAudioToBuffer(const QByteArray& audioByteArray) { · 664 unmodified lines | ||
| 665 | 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 | |
| 668 | 670 | void Audio::addSpatialAudioToBuffer(unsigned int sampleTime, const QByteArray& spatialAudio, unsigned int numSamples) { |
| 669 | 671 | // Calculate the number of remaining samples available. The source spatial audio buffer will get |
| 670 | 672 | // clipped if there are insufficient samples available in the accumulation buffer. |