mirror of
https://github.com/Ryujinx/libsoundio.git
synced 2024-12-22 23:15:32 +00:00
sio_sine example: check memory allocation
This commit is contained in:
parent
552167fa0e
commit
1b332a44a0
|
@ -209,6 +209,11 @@ int main(int argc, char **argv) {
|
||||||
}
|
}
|
||||||
|
|
||||||
struct SoundIoOutStream *outstream = soundio_outstream_create(device);
|
struct SoundIoOutStream *outstream = soundio_outstream_create(device);
|
||||||
|
if (!outstream) {
|
||||||
|
fprintf(stderr, "out of memory\n");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
outstream->write_callback = write_callback;
|
outstream->write_callback = write_callback;
|
||||||
outstream->underflow_callback = underflow_callback;
|
outstream->underflow_callback = underflow_callback;
|
||||||
outstream->name = stream_name;
|
outstream->name = stream_name;
|
||||||
|
|
Loading…
Reference in a new issue