0
1
mirror of https://github.com/radio95-rnt/fm95.git synced 2026-02-27 03:23:54 +01:00
This commit is contained in:
2025-01-31 18:21:27 +01:00
parent 7829a995cd
commit d051657724

View File

@@ -435,7 +435,14 @@ int main(int argc, char **argv) {
break;
}
} else {
snd_pcm_writei(output_handle, output, sizeof(output));
snd_pcm_sframes_t frames_written = snd_pcm_writei(output_handle, output, BUFFER_SIZE);
if (frames_written < 0) {
fprintf(stderr, "Error: write to audio interface failed: %s\n", snd_strerror(frames_written));
to_run = 0;
break;
} else if (frames_written < BUFFER_SIZE) {
fprintf(stderr, "Warning: underrun, only %ld frames written out of %d\n", frames_written, BUFFER_SIZE);
}
}
}
printf("Cleaning up...\n");