mirror of
https://github.com/ZHANGTIANYAO1/teamspeak-music-bot.git
synced 2026-10-02 04:52:50 +08:00
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:
2 files changed
+48
-10
No files matched your search
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user