Add diagnostic logging for playback pipeline debugging

Adds info-level logs at each stage of the audio pipeline to help
diagnose why playback produces no audible output:
- FFmpeg first PCM data received
- FFmpeg process exit code
- FFmpeg stderr (errors/HTTP/stream info at info level)
- First opus frame encoded and emitted
- First voice packet sent to TeamSpeak
- Error catching in frame encoding loop

https://claude.ai/code/session_01EjpEsC2GCsvwbu4n3XC8EE
This commit is contained in:
Claude committed 2026-03-31 16:30:53 +00:00
1 parent 55c373d2bf
commit 1a880ef20b
2 files changed
+48 -10

No files matched your search

+13 -1
View File
@@ -175,9 +175,21 @@ export class TS3Client extends EventEmitter {
}
}
private voiceFramesSent = 0;
sendVoiceData(opusFrame: Buffer): void {
if (!this.client || this.disconnecting) return;
this.client.sendVoice(opusFrame, 5);
try {
this.client.sendVoice(opusFrame, 5);
this.voiceFramesSent++;
if (this.voiceFramesSent === 1) {
this.logger.info({ opusBytes: opusFrame.length, clientId: this.clientId }, "First voice packet sent to TeamSpeak");
}
} catch (err) {
if (this.voiceFramesSent === 0) {
this.logger.error({ err }, "Failed to send first voice packet");
}
}
}
getIdentityExport(): string {