fix(audio): clipped SPI audio on nv14/el18/x12s (#5905)
This commit is contained in:
+3
-3
@@ -90,10 +90,10 @@ constexpr uint8_t AUDIO_FILENAME_MAXLEN = (AUDIO_LUA_FILENAME_MAXLEN > AUDIO_MOD
|
|||||||
|
|
||||||
#if defined(SIMU) && defined(SIMU_AUDIO)
|
#if defined(SIMU) && defined(SIMU_AUDIO)
|
||||||
#define AUDIO_BUFFER_COUNT (10) // simulator needs more buffers for smooth audio
|
#define AUDIO_BUFFER_COUNT (10) // simulator needs more buffers for smooth audio
|
||||||
#elif defined(PCBX12S)
|
#elif defined(AUDIO_SPI)
|
||||||
#define AUDIO_BUFFER_COUNT (2) // smaller than Taranis since there is also a buffer on the ADC chip
|
#define AUDIO_BUFFER_COUNT (2) // smaller than Taranis since there is also a buffer on the ADC chip
|
||||||
#elif defined(PCBPL18)
|
#elif defined(STORAGE_USE_SPI_FLASH)
|
||||||
#define AUDIO_BUFFER_COUNT (10) // PL18 need more buffer for smooth audio
|
#define AUDIO_BUFFER_COUNT (10) // SPI Flash need more buffer for smooth audio
|
||||||
#else
|
#else
|
||||||
#define AUDIO_BUFFER_COUNT (3)
|
#define AUDIO_BUFFER_COUNT (3)
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -68,8 +68,8 @@
|
|||||||
#define SM_LINE1 0x4000
|
#define SM_LINE1 0x4000
|
||||||
#define SM_CLK_RANGE 0x8000
|
#define SM_CLK_RANGE 0x8000
|
||||||
|
|
||||||
#define SPI_LOW_SPEED 1755000
|
#define SPI_LOW_SPEED 1500000
|
||||||
#define SPI_HIGH_SPEED 9216000
|
#define SPI_HIGH_SPEED 12000000
|
||||||
|
|
||||||
#define VS1053_BUFFER_SIZE 32
|
#define VS1053_BUFFER_SIZE 32
|
||||||
|
|
||||||
@@ -305,6 +305,7 @@ static void vs1053b_mute()
|
|||||||
if (!_last_play_ts) {
|
if (!_last_play_ts) {
|
||||||
// we start the mute delay now
|
// we start the mute delay now
|
||||||
_last_play_ts = now;
|
_last_play_ts = now;
|
||||||
|
return;
|
||||||
} else if (now - _last_play_ts < _instance->mute_delay_ms) {
|
} else if (now - _last_play_ts < _instance->mute_delay_ms) {
|
||||||
// delay not expired, we may not mute yet
|
// delay not expired, we may not mute yet
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user