Skip to content

Commit d271a42

Browse files
committed
Fix voice stream steam-to-steam
1 parent b83914b commit d271a42

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

revoice/src/SteamP2PCodec.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ int CSteamP2PCodec::StreamDecode(const char *pCompressed, int compressedBytes, c
7272

7373
// Invalid or unknown opcode
7474
default:
75-
LCPrintf(true, "CSteamP2PCodec::StreamDecode() called on client(%d) with unknown voice codec opcode (%d)\n", m_Client->GetId(), opcode);
75+
// LCPrintf(true, "CSteamP2PCodec::StreamDecode() called on client(%d) with unknown voice codec opcode (%d)\n", m_Client->GetId(), opcode);
7676
return 0;
7777
}
7878
}

revoice/src/revoice_main.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,9 @@ void SV_ParseVoiceData_emu(IGameClient *cl)
8080

8181
char transcodedBuf[4096];
8282

83-
char *opusData = nullptr;
8483
char *silkData = nullptr;
8584
char *speexData = nullptr;
8685

87-
int opusDataLen = 0;
8886
int silkDataLen = 0;
8987
int speexDataLen = 0;
9088

@@ -105,9 +103,9 @@ void SV_ParseVoiceData_emu(IGameClient *cl)
105103
if (nDataLength > MAX_OPUS_DATA_LEN || srcPlayer->GetVoiceRate() > MAX_OPUS_VOICE_RATE)
106104
return;
107105

108-
opusData = chReceived; opusDataLen = nDataLength;
106+
silkData = chReceived; silkDataLen = nDataLength;
109107
speexData = transcodedBuf;
110-
speexDataLen = TranscodeVoice(srcPlayer, opusData, opusDataLen, srcPlayer->GetOpusCodec(), srcPlayer->GetSpeexCodec(), transcodedBuf, sizeof(transcodedBuf));
108+
speexDataLen = TranscodeVoice(srcPlayer, silkData, silkDataLen, srcPlayer->GetOpusCodec(), srcPlayer->GetSpeexCodec(), transcodedBuf, sizeof(transcodedBuf));
111109
break;
112110
}
113111
case vct_speex:

0 commit comments

Comments
 (0)