Closed ul closed 7 years ago
Usually when microphone example is run you never hit buffer underflow and "fill with zeros" branch is never executed. But when it's executed it fails with "invalid value" because of checks performed on frame_count. This platform-independent check https://github.com/andrewrk/libsoundio/blob/8094dc52498dc97dcadd60c35df737c86d6c6614/src/soundio.c#L447 sometimes passed because unitialized local frame_count have arbitrary value, but this CoreAudio one https://github.com/andrewrk/libsoundio/blob/8094dc52498dc97dcadd60c35df737c86d6c6614/src/coreaudio.c#L1078 is not passed, and "fill with zeros" scenario always fails on MacOS.
Thank you
Usually when microphone example is run you never hit buffer underflow and "fill with zeros" branch is never executed. But when it's executed it fails with "invalid value" because of checks performed on frame_count. This platform-independent check https://github.com/andrewrk/libsoundio/blob/8094dc52498dc97dcadd60c35df737c86d6c6614/src/soundio.c#L447 sometimes passed because unitialized local frame_count have arbitrary value, but this CoreAudio one https://github.com/andrewrk/libsoundio/blob/8094dc52498dc97dcadd60c35df737c86d6c6614/src/coreaudio.c#L1078 is not passed, and "fill with zeros" scenario always fails on MacOS.