2
0
mirror of https://github.com/rehlds/revoice.git synced 2025-02-05 10:10:41 +03:00

Fix voice stream steam-to-steam

This commit is contained in:
s1lent 2017-07-09 16:09:53 +07:00
parent b83914b030
commit d271a42878
No known key found for this signature in database
GPG Key ID: 0FE401DC73916B5C
2 changed files with 3 additions and 5 deletions

View File

@ -72,7 +72,7 @@ int CSteamP2PCodec::StreamDecode(const char *pCompressed, int compressedBytes, c
// Invalid or unknown opcode
default:
LCPrintf(true, "CSteamP2PCodec::StreamDecode() called on client(%d) with unknown voice codec opcode (%d)\n", m_Client->GetId(), opcode);
// LCPrintf(true, "CSteamP2PCodec::StreamDecode() called on client(%d) with unknown voice codec opcode (%d)\n", m_Client->GetId(), opcode);
return 0;
}
}

View File

@ -80,11 +80,9 @@ void SV_ParseVoiceData_emu(IGameClient *cl)
char transcodedBuf[4096];
char *opusData = nullptr;
char *silkData = nullptr;
char *speexData = nullptr;
int opusDataLen = 0;
int silkDataLen = 0;
int speexDataLen = 0;
@ -105,9 +103,9 @@ void SV_ParseVoiceData_emu(IGameClient *cl)
if (nDataLength > MAX_OPUS_DATA_LEN || srcPlayer->GetVoiceRate() > MAX_OPUS_VOICE_RATE)
return;
opusData = chReceived; opusDataLen = nDataLength;
silkData = chReceived; silkDataLen = nDataLength;
speexData = transcodedBuf;
speexDataLen = TranscodeVoice(srcPlayer, opusData, opusDataLen, srcPlayer->GetOpusCodec(), srcPlayer->GetSpeexCodec(), transcodedBuf, sizeof(transcodedBuf));
speexDataLen = TranscodeVoice(srcPlayer, silkData, silkDataLen, srcPlayer->GetOpusCodec(), srcPlayer->GetSpeexCodec(), transcodedBuf, sizeof(transcodedBuf));
break;
}
case vct_speex: