mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 19:04:32 +02:00
fix send of mixed audio stream packet from AM
This commit is contained in:
parent
765e8cbb87
commit
863cc3390a
3 changed files with 5 additions and 2 deletions
|
@ -777,7 +777,7 @@ void AudioMixer::run() {
|
|||
std::unique_ptr<NLPacket> mixPacket;
|
||||
|
||||
if (streamsMixed > 0) {
|
||||
int mixPacketBytes = sizeof(quint16) + AudioConstants::NETWORK_FRAME_BYTES_STEREO * sizeof(int16_t);
|
||||
int mixPacketBytes = sizeof(quint16) + AudioConstants::NETWORK_FRAME_BYTES_STEREO;
|
||||
mixPacket = NLPacket::create(PacketType::MixedAudio, mixPacketBytes);
|
||||
|
||||
// pack sequence number
|
||||
|
|
|
@ -48,7 +48,7 @@ int AvatarAudioStream::parseStreamProperties(PacketType::Value type, const QByte
|
|||
|
||||
// read the positional data
|
||||
readBytes += parsePositionalData(packetAfterSeqNum.mid(readBytes));
|
||||
|
||||
|
||||
// calculate how many samples are in this packet
|
||||
int numAudioBytes = packetAfterSeqNum.size() - readBytes;
|
||||
numAudioSamples = numAudioBytes / sizeof(int16_t);
|
||||
|
|
|
@ -126,8 +126,11 @@ qint64 NodeList::sendStatsToDomainServer(const QJsonObject& statsObject) {
|
|||
|
||||
void NodeList::timePingReply(QSharedPointer<NLPacket> packet, const SharedNodePointer& sendingNode) {
|
||||
PingType_t pingType;
|
||||
|
||||
quint64 ourOriginalTime, othersReplyTime;
|
||||
|
||||
packet->seek(0);
|
||||
|
||||
packet->readPrimitive(&pingType);
|
||||
packet->readPrimitive(&ourOriginalTime);
|
||||
packet->readPrimitive(&othersReplyTime);
|
||||
|
|
Loading…
Reference in a new issue