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

Overload AudioFile::load to accept a memory load #39

Closed
rilpires opened this issue Feb 13, 2021 · 4 comments
Closed

Overload AudioFile::load to accept a memory load #39

rilpires opened this issue Feb 13, 2021 · 4 comments

Comments

@rilpires
Copy link

rilpires commented Feb 13, 2021

It would be very helpful for directly loading decrypted .wav files. I noted it is almost done with AudioFile::decodeWaveFile, but it is a private method, so maybe an overloaded option of AudioFile::load would be great, accepting (void* data, size_t size) or std::vector<uint8_t>
Thanks for this awesome library

@adamstark
Copy link
Owner

Hi there, can you explain a little more - do you mean that you have already got the contents of a file in memory somewhere and you just want to decode it to a WAV? So you just need to point to the file data?

@rilpires
Copy link
Author

Well, yes, I did it here, it was useful for resource unpackaging I made for my engine. It was a very small change, now I don't think I should have created an issue for this, so I'll leave this just as a suggestion

@adamstark
Copy link
Owner

I had a think about this - I think it is an easy change so why not do it. Perhaps the method could be loadFromMemory() so that load() is for files alone? If that sounds good I'll make that change.

@adamstark adamstark reopened this Feb 24, 2021
@adamstark
Copy link
Owner

I've just added this on develop :)

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