diff --git a/src/minimodem.c b/src/minimodem.c index d254df2..34f831b 100644 --- a/src/minimodem.c +++ b/src/minimodem.c @@ -394,7 +394,8 @@ main( int argc, char*argv[] ) if ( ! sa_out ) sa_out = simpleaudio_open_stream_pulseaudio(SA_STREAM_PLAYBACK, program_name, "output audio"); - assert( sa_out ); + if ( ! sa_out ) + return 1; fsk_transmit_stdin(sa_out, bfsk_data_rate, diff --git a/src/simpleaudio-pulse.c b/src/simpleaudio-pulse.c index de0ed66..4a3aa2b 100644 --- a/src/simpleaudio-pulse.c +++ b/src/simpleaudio-pulse.c @@ -100,14 +100,14 @@ simpleaudio_open_stream_pulseaudio( .channels = 1, }; - /* Create the recording stream */ + /* Create the playback or recording stream */ pa_simple *s; s = pa_simple_new(NULL, app_name, sa_stream_direction == SA_STREAM_RECORD ? PA_STREAM_RECORD : PA_STREAM_PLAYBACK, NULL, stream_name, &ss, NULL, NULL, &error); if ( !s ) { - fprintf(stderr, "pa_simple_new: %s\n", pa_strerror(error)); + fprintf(stderr, "E: Cannot create PulseAudio stream: %s\n ", pa_strerror(error)); return NULL; }