fix(music): smooth wav chunk streaming playback
Bump the station build to v1.0.4, reduce live WAV chunk size to 0.5 seconds, and keep native speaker queues fed during streaming instead of draining after every chunk so playback is less jittery and stays closer to real time.
This commit is contained in:
@@ -324,7 +324,7 @@ async function sendLiveWavChunksToStation(stationName, fallbackWs, task) {
|
||||
const sampleRate = 48000;
|
||||
const channels = 1;
|
||||
const bitsPerSample = 16;
|
||||
const chunkDurationSec = 1.0;
|
||||
const chunkDurationSec = 0.5;
|
||||
const chunkBytes = Math.max(4096, Math.floor(sampleRate * channels * (bitsPerSample / 8) * chunkDurationSec));
|
||||
|
||||
targetWs.send(JSON.stringify({
|
||||
|
||||
Reference in New Issue
Block a user