Add server-side Opus encoding diagnostic logs
Logs compressed audio size in HandleAudioReceived to diagnose why MulticastReceiveAgentAudio (Unreliable) never reaches clients. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
84a4fd7e0e
commit
913be3c631
@ -648,8 +648,23 @@ void UPS_AI_ConvAgent_ElevenLabsComponent::HandleAudioReceived(const TArray<uint
|
|||||||
{
|
{
|
||||||
TArray<uint8> CompressedData;
|
TArray<uint8> CompressedData;
|
||||||
CompressedData.Append(OpusWorkBuffer.GetData(), CompressedSize);
|
CompressedData.Append(OpusWorkBuffer.GetData(), CompressedSize);
|
||||||
|
|
||||||
|
if (bDebug)
|
||||||
|
{
|
||||||
|
UE_LOG(LogPS_AI_ConvAgent_ElevenLabs, Log,
|
||||||
|
TEXT("[NET-SRV] Multicasting Opus audio: %d bytes PCM → %d bytes Opus (%.1f:1 ratio)"),
|
||||||
|
PCMData.Num(), CompressedSize,
|
||||||
|
PCMData.Num() > 0 ? static_cast<float>(PCMData.Num()) / CompressedSize : 0.f);
|
||||||
|
}
|
||||||
|
|
||||||
MulticastReceiveAgentAudio(CompressedData);
|
MulticastReceiveAgentAudio(CompressedData);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
UE_LOG(LogPS_AI_ConvAgent_ElevenLabs, Warning,
|
||||||
|
TEXT("[NET-SRV] Opus encode produced 0 bytes from %d bytes PCM — audio not sent."),
|
||||||
|
PCMData.Num());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Server local playback (Listen Server is also a client).
|
// Server local playback (Listen Server is also a client).
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user