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

[DAP] Redesigning AudioFile interface. #169

Open
SForeKeeper opened this issue Jun 29, 2023 · 0 comments
Open

[DAP] Redesigning AudioFile interface. #169

SForeKeeper opened this issue Jun 29, 2023 · 0 comments

Comments

@SForeKeeper
Copy link
Contributor

SForeKeeper commented Jun 29, 2023

Is your feature request related to a problem? Please describe.
Currently it is required to use a set of complicated functions to transfer the ownership between AudioFile and MemRef. It's not intuitive for end users.

Describe the solution you'd like

  1. Integrate AudioFile functions to AudioContainer. It requires heavy rework for all AudioFile functions, but the integration would be much better and no ownership transformation is needed. We may use a modular design, like custom loaders and savers for AudioContainer, thus the actually encoding and decoding functions could be added at any time.

Describe alternatives you've considered

  1. Let both of AudioFile and MemRef hold the pointer, then AudioContainer holds them both. Since they have similiar life cycle, this method is feasible and doesn't require much rework.
  2. Repair the function to handover ownership. Currently this function can be invoked only once. If encapsulated well, the user could use getMemRef and getAudioFile for unlimited times. This requires the least rework, but it would not be so intuitive for future developers.
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

No branches or pull requests

1 participant