mirror of
https://github.com/Ryujinx/libsoundio.git
synced 2024-12-22 18:15:36 +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);
|
||||
if (!outstream) {
|
||||
fprintf(stderr, "out of memory\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
outstream->write_callback = write_callback;
|
||||
outstream->underflow_callback = underflow_callback;
|
||||
outstream->name = stream_name;
|
||||
|
|
Loading…
Reference in a new issue