Files
tongtong 37b2cff82b feat: 打通音频整链,被控端送 PCM、主控端 waveOut 播放
- android_receiver:音频改为直接送 PCM16(FLAG_PCM=0x80),不再走 Opus 编码
  (仓库未打包 libopus,MediaCodec Opus 多数设备不可用,主控端也无解码器)
- rust_core:新增 media/audio 播放队列(上限 1 秒、按帧对齐切分、超出丢最旧)
- rust_core:音频分片校验 MAC 后按 FLAG_PCM 入队,旧 Opus 包明确丢弃并记日志
- rust_core:新增 ttstd_audio_next / ttstd_audio_pending / ttstd_audio_stats
- flutter_sender:新增 audio_player(waveOut)轮询播放队列,有数据才打开设备、静音 3 秒自动关闭
- docs:README 增加音频链路章节与 PCM 取舍,AGENTS 记录 FLAG_PCM 约定
2026-11-27 21:15:17 +08:00

13 lines
472 B
C
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#ifndef RUNNER_AUDIO_PLAYER_H_
#define RUNNER_AUDIO_PLAYER_H_
// 播放 Rust Core 音频队列里的 PCM(48 kHz / 双声道 / 16 bit 小端)。
//
// 和视频纹理一样由 runner 自己起线程轮询 FFI 队列:
// - 有数据才打开 waveOut,静音 3 秒自动关闭,不长期占用音频设备;
// - 不依赖 Dart 侧参与,投屏开始/结束无需额外通道。
void StartAudioPlayer();
void StopAudioPlayer();
#endif // RUNNER_AUDIO_PLAYER_H_