Overload AudioFile::load to accept a memory load
rilpires opened this issue · 4 comments
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
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?
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
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.
I've just added this on develop
:)