array conversions

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev
2021-11-13 17:27:07 -08:00
parent e08c85ae2d
commit 9bcd425a85
5 changed files with 12 additions and 10 deletions

View File

@@ -760,7 +760,7 @@ Play_44_1_Silence(snd_pcm_t *pcm)
throw Alsa::MakeError(err, "snd_pcm_prepare() failed");
AllocatedArray<int16_t> buffer{channels * period_size};
std::fill(buffer.begin(), buffer.end(), 0);
buffer = {};
/* play at least 250ms of silence */
for (snd_pcm_uframes_t remaining_frames = rate / 4;;) {