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:
parent
b83914b030
commit
d271a42878
@ -72,7 +72,7 @@ int CSteamP2PCodec::StreamDecode(const char *pCompressed, int compressedBytes, c
|
|||||||
|
|
||||||
// Invalid or unknown opcode
|
// Invalid or unknown opcode
|
||||||
default:
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -80,11 +80,9 @@ void SV_ParseVoiceData_emu(IGameClient *cl)
|
|||||||
|
|
||||||
char transcodedBuf[4096];
|
char transcodedBuf[4096];
|
||||||
|
|
||||||
char *opusData = nullptr;
|
|
||||||
char *silkData = nullptr;
|
char *silkData = nullptr;
|
||||||
char *speexData = nullptr;
|
char *speexData = nullptr;
|
||||||
|
|
||||||
int opusDataLen = 0;
|
|
||||||
int silkDataLen = 0;
|
int silkDataLen = 0;
|
||||||
int speexDataLen = 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)
|
if (nDataLength > MAX_OPUS_DATA_LEN || srcPlayer->GetVoiceRate() > MAX_OPUS_VOICE_RATE)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
opusData = chReceived; opusDataLen = nDataLength;
|
silkData = chReceived; silkDataLen = nDataLength;
|
||||||
speexData = transcodedBuf;
|
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;
|
break;
|
||||||
}
|
}
|
||||||
case vct_speex:
|
case vct_speex:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user