debug: Logs fuer Auto-Playback-Bug — canPlay + silent-state sichtbar
Stefan berichtet dass Auto-Playback trotz Closure-Fix nicht greift. Zwei neue Log-Zeilen die beim naechsten Test direkt zeigen was schief laeuft: - ChatScreen: "[Chat] audio-msg canPlay=X (enabled=Y muted=Z)" - audio.ts: "[Audio] PCM-Stream start: silent=X messageId=Y ..." Ausreichend um zu unterscheiden: * canPlay=false trotz Mund-an → ttsMuted bleibt im State haengen * canPlay=true aber silent=true in audio.ts → Ref-Bug oder race * silent=false aber nichts hoerbar → native-module oder audio-routing Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -316,6 +316,10 @@ const ChatScreen: React.FC = () => {
|
||||
// TTS-Audio abspielen wenn vorhanden — respektiert geraetelokalen Mute/Disable
|
||||
// WICHTIG: via Ref statt direkt state lesen, sonst ist's stale (Closure-Bug).
|
||||
const canPlay = ttsCanPlayRef.current;
|
||||
if (message.type === 'audio_pcm' || (message.type === 'audio' && message.payload.base64)) {
|
||||
console.log('[Chat] audio-msg canPlay=%s (enabled=%s muted=%s)',
|
||||
canPlay, ttsDeviceEnabled, ttsMuted);
|
||||
}
|
||||
if (message.type === 'audio' && message.payload.base64) {
|
||||
const b64 = message.payload.base64 as string;
|
||||
const refId = (message.payload.messageId as string) || '';
|
||||
|
||||
Reference in New Issue
Block a user