fix(mcp): use audio-stream instead of direct I2S - fixes fast mp3/voice playback
- old optimization bypassed audio-stream resampler (16k direct -> MCLK 4.096MHz vs 11.29MHz native) - brick game correct because it used audio_stream path - now MCP uses audio_stream_open_output/input + read/write matching native logger stack - falls back to direct I2S only if audio-stream device missing
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tactility/device.h>
|
||||
#include <tactility/drivers/audio_stream.h>
|
||||
|
||||
namespace tt::mcp {
|
||||
|
||||
@@ -25,6 +26,8 @@ struct McpSystemState {
|
||||
|
||||
// Audio device status
|
||||
Device* i2sDevice = nullptr;
|
||||
Device* audioStreamDevice = nullptr;
|
||||
AudioStreamHandle audioHandle = nullptr;
|
||||
volatile bool audioBusy = false;
|
||||
volatile bool audioRunning = false; // Used to abort play/record loop
|
||||
|
||||
|
||||
Reference in New Issue
Block a user