Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ALSA mmap IO #282

Open
ishitatsuyuki opened this issue Jun 12, 2019 · 2 comments
Open

ALSA mmap IO #282

ishitatsuyuki opened this issue Jun 12, 2019 · 2 comments

Comments

@ishitatsuyuki
Copy link
Collaborator

We should use mmap when trying to achieve the lowest latency, because copy overhead can become a roadblock when using a extremely small buffer size.

(Other platforms often have this implemented as a part of the low-level API, so we have been already using memory mapped IO.)

@sniperrifle2004
Copy link

sniperrifle2004 commented Jun 18, 2020

Correct me if I'm wrong, but if you truly want to achieve low latency you also need to expose that back to the application right? Samples have to be written directly into the mapped memory after all. Is that something cpal is doing?

@ishitatsuyuki
Copy link
Collaborator Author

We expose &mut [SampleType] buffers, so it can be zero-copy as long as we don't need to convert (e.g. interleavedness).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants