mirror of
https://github.com/radio95-rnt/rds95.git
synced 2026-02-27 04:43:52 +01:00
print the pulse error
This commit is contained in:
@@ -297,6 +297,8 @@ done_parsing_opts:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int pulse_error;
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
fm_rds_get_frames(mpx_buffer, NUM_MPX_FRAMES_IN);
|
fm_rds_get_frames(mpx_buffer, NUM_MPX_FRAMES_IN);
|
||||||
|
|
||||||
@@ -305,8 +307,8 @@ done_parsing_opts:
|
|||||||
float2char2channel(out_buffer, dev_out, frames);
|
float2char2channel(out_buffer, dev_out, frames);
|
||||||
|
|
||||||
/* num_bytes = audio frames( * channels) * bytes per sample */
|
/* num_bytes = audio frames( * channels) * bytes per sample */
|
||||||
if (pa_simple_write(device, dev_out, frames * sizeof(int16_t), NULL) != 0) {
|
if (pa_simple_write(device, dev_out, frames * sizeof(int16_t), &pulse_error) != 0) {
|
||||||
fprintf(stderr, "Error: could not play audio.\n");
|
fprintf(stderr, "Error: could not play audio. (%s)\n", pa_strerror(pulse_error));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user