mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 13:38:02 +02:00
Fix bug in audio-mixer audio packet parsing.
Codec string was being read as channel flag.
This commit is contained in:
parent
724db93389
commit
ad2a031060
1 changed files with 6 additions and 2 deletions
|
@ -275,9 +275,13 @@ int AudioMixerClientData::parseData(ReceivedMessage& message) {
|
||||||
if (micStreamIt == _audioStreams.end()) {
|
if (micStreamIt == _audioStreams.end()) {
|
||||||
// we don't have a mic stream yet, so add it
|
// we don't have a mic stream yet, so add it
|
||||||
|
|
||||||
// read the channel flag to see if our stream is stereo or not
|
// hop past the sequence number that leads the packet
|
||||||
message.seek(sizeof(quint16));
|
message.seek(sizeof(quint16));
|
||||||
|
|
||||||
|
// pull the codec string from the packet
|
||||||
|
auto codecString = message.readString();
|
||||||
|
|
||||||
|
// read the channel flag to see if our stream is stereo or not
|
||||||
quint8 channelFlag;
|
quint8 channelFlag;
|
||||||
message.readPrimitive(&channelFlag);
|
message.readPrimitive(&channelFlag);
|
||||||
|
|
||||||
|
@ -285,7 +289,7 @@ int AudioMixerClientData::parseData(ReceivedMessage& message) {
|
||||||
|
|
||||||
auto avatarAudioStream = new AvatarAudioStream(isStereo, AudioMixer::getStaticJitterFrames());
|
auto avatarAudioStream = new AvatarAudioStream(isStereo, AudioMixer::getStaticJitterFrames());
|
||||||
avatarAudioStream->setupCodec(_codec, _selectedCodecName, AudioConstants::MONO);
|
avatarAudioStream->setupCodec(_codec, _selectedCodecName, AudioConstants::MONO);
|
||||||
qCDebug(audio) << "creating new AvatarAudioStream... codec:" << _selectedCodecName;
|
qCDebug(audio) << "creating new AvatarAudioStream... codec:" << _selectedCodecName << "channels:" << (channelFlag + 1);
|
||||||
|
|
||||||
connect(avatarAudioStream, &InboundAudioStream::mismatchedAudioCodec,
|
connect(avatarAudioStream, &InboundAudioStream::mismatchedAudioCodec,
|
||||||
this, &AudioMixerClientData::handleMismatchAudioFormat);
|
this, &AudioMixerClientData::handleMismatchAudioFormat);
|
||||||
|
|
Loading…
Reference in a new issue