Compare commits

..

No commits in common. "fd95af2c40042d233ba222d0202f87c57e0aa213" and "1d34143be51353c2e8fc7f2d88188d9ca9d56382" have entirely different histories.

3 changed files with 2 additions and 18 deletions

View File

@ -119,13 +119,8 @@ class PcmStreamPlayerModule(reactContext: ReactApplicationContext) : ReactContex
if (endRequested) {
// Falls wir vor Pre-Roll enden (kurzer Text): trotzdem abspielen
if (!playbackStarted) {
try {
t.play()
playbackStarted = true
Log.i(TAG, "Playback gestartet VOR Pre-Roll (kurzer Text, ${bytesBuffered}B gepuffert)")
} catch (e: Exception) {
Log.w(TAG, "play() fallback failed: ${e.message}")
}
try { t.play() } catch (_: Exception) {}
playbackStarted = true
}
return@Thread
}

View File

@ -316,10 +316,6 @@ 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) || '';

View File

@ -459,13 +459,6 @@ class AudioService {
console.warn('[Audio] PcmStreamPlayer Native Module nicht verfuegbar');
return '';
}
// Debug-Log bei Chunk 0 eines neuen Streams — damit man im adb logcat
// sieht warum der Auto-Playback greift oder nicht.
if ((payload.chunk ?? 0) === 0 && !this.pcmStreamActive) {
console.log('[Audio] PCM-Stream start: silent=%s messageId=%s sr=%s ch=%s',
silent, payload.messageId || '(none)',
payload.sampleRate, payload.channels);
}
const messageId = payload.messageId || '';
const sampleRate = payload.sampleRate || 24000;