output/osx: postpone start until the first Play() call

Wait until there is some data; don't let our render callback be
invoked without any data.
This commit is contained in:
Max Kellermann 2020-07-02 15:21:19 +02:00
parent 8047102542
commit bc9e074822

View File

@ -758,12 +758,8 @@ OSXOutput::Open(AudioFormat &audio_format)
#endif
ring_buffer = new boost::lockfree::spsc_queue<uint8_t>(ring_buffer_size);
status = AudioOutputUnitStart(au);
if (status != 0)
Apple::ThrowOSStatus(status, "Unable to start audio output");
pause = false;
started = true;
started = false;
}
size_t