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

Is partial loading possible? #38

Open
Athospd opened this issue Jan 26, 2021 · 1 comment
Open

Is partial loading possible? #38

Athospd opened this issue Jan 26, 2021 · 1 comment

Comments

@Athospd
Copy link

Athospd commented Jan 26, 2021

I would like to load just an interval of a given .wav file aiming to avoid bringing the full audio to memory. Is it possible?
When I call .load(filepath) it seems to bring everything at once. Am I right?

Thank you for this awesome lib!

@dedobbin
Copy link

dedobbin commented May 8, 2021

I'm working on a feature that allows this. It still loads all raw data to RAM, but only decodes the part you need. Is that acceptable in your case? You would use it like myAudioFile.load ("path_to_file", numFrames);

I'm still looking into only loading the raw data that is needed, because this current approach doesn't give much benefit over loading a full audio file and resizing it. But that would need a bit more of restructuring.

If you are interested you can find it here:
https://github.com/dedobbin/AudioFile/tree/partial-load

It's still WIP but if there is interest i can make a PR

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

2 participants