-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Minimizing the bufferSize #59
Comments
Hi, which OS are you using? AFAIK, the implementation on Linux allows for really short buffer sizes, while implementations on other OSs are a little worse (but still completely fine for games, media apps, etc). |
I'm on a Mac. But that's good to know. I could very well be doing something else wrong somewhere else. |
Try Linux. Even a virtual machine could help. I was able to get 1/100s and less buffer size on Linux. Beep uses Oto for low level audio playback. Me and Hajime Hosi collaborated on it. It's a little unfortunate that the low level implementation for Mac isn't as good as for Linux. This is because the Mac implementation uses OpenAL, which is a pretty shit library with regards to latency. Hopefully, we'll improve it someday. The driver for Windows may actually also be good, but I've never tried it personally (Hajime Hoshi has implemented it). |
Awesome. I'll give it a shot in virtualBox. I'll dig through some of that Oto code also. I'm trying to get a better understanding of how the lower level audio stuff works anyway. |
I've been working on a super simple midi-based synthesizer based heavily on your approach to handling the audio signal. I'd like to keep working on it but I can't seem to get the buffersize down enough so that the latency isn't so noticeable. I can get it down to about 22 milliseconds but any lower and there's a clicking sound. Do you have an idea as to why the smaller buffer sizes become problematic?
My start is here, if you're curious:
https://github.com/lucianthorr/aja/blob/3ee2d82b74f5ab6755732f9f30a0899d18cc2464/main.go#L24
The text was updated successfully, but these errors were encountered: