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

Create C API #4

Open
ChunMinChang opened this issue Jan 21, 2020 · 3 comments · May be fixed by #6
Open

Create C API #4

ChunMinChang opened this issue Jan 21, 2020 · 3 comments · May be fixed by #6
Assignees

Comments

@ChunMinChang
Copy link
Member

We should create C APIs for this crate so it can be reused in the cubeb C backends as well.

@ChunMinChang
Copy link
Member Author

We should probably also compare the performance of this crate with the cubeb_mixer to see what can we improve here.

@padenot
Copy link
Collaborator

padenot commented Jan 22, 2020

I wouldn't expect this mixer to show up in profiles, so it's probably not necessary to optimize it right now, but it would be good to check this assumption.

@ChunMinChang
Copy link
Member Author

Now I've tried two approaches:

  1. Exposing C API behind a feature flag: draft
  2. Create a separated crate for C API (like what mp4parse does): draft

If the C APIs are exposed behind a feature, the pro is the C APIs are always updated to the latest version. The cons is there will be duplicated #[cfg(feature = "capi")] in the code. I don't expect the implementation of this crate getting complicated, so maybe the duplicate #[cfg(feature = "capi")] is manageable.

On the other hand, if C APIs are exposed by a separated crate, the pro is no special settings in the main mixer crate (no flags are used). The con is it needs to maintain and update/publish two crates.

@ChunMinChang ChunMinChang self-assigned this Mar 11, 2020
@ChunMinChang ChunMinChang linked a pull request Apr 13, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants