PulseAudio: handle error instead of panicking

This commit is contained in:
Andrew Kelley 2015-08-04 22:19:42 -07:00
parent 753673b194
commit bdb604cc45

View file

@ -975,9 +975,8 @@ static int instream_begin_read_pa(SoundIoPrivate *si,
assert(ispa->stream_ready);
if (!ispa->peek_buf) {
if (pa_stream_peek(stream, (const void **)&ispa->peek_buf, &ispa->peek_buf_size)) {
soundio_panic("TODO");
}
if (pa_stream_peek(stream, (const void **)&ispa->peek_buf, &ispa->peek_buf_size))
return SoundIoErrorStreaming;
ispa->peek_buf_frames_left = ispa->peek_buf_size / instream->bytes_per_frame;
ispa->peek_buf_index = 0;