gtreshchev / RuntimeAudioImporter

Runtime Audio Importer plugin for Unreal Engine. Importing audio of various formats at runtime.
MIT License
308 stars 67 forks source link

Adding encoded audio without callback. #49

Closed Segei closed 8 months ago

Segei commented 10 months ago

Adding encoded audio to a track is delayed and there is no ending callback. For further export, you need to crutch the delay. Capture

gtreshchev commented 10 months ago

Makes sense! For now, to identify the end of this process, you can bind to OnPopulateAudioData just before calling your function to append audio data, and once that delegate is broadcast, simply unbind from it, and proceed next. But yeah, it definitely makes sense to create that within the function itself, thanks for letting me know!

gtreshchev commented 10 months ago

There are many append-wise functions, and for each of them, I would need to create both dynamic and static delegates. This would lead to a lot of repeated code. I'm considering whether it would be better to handle this using a single per-object-instanced multicast delegate, similar to OnPopulateAudioData, but without passing the audio data itself to make it more optimized. But I'm unsure about the most appropriate naming convention for this. Let me know if you have any ideas.

gtreshchev commented 8 months ago

There should now be the OnPopulateAudioState lightweight delegate for that purpose: https://github.com/gtreshchev/RuntimeAudioImporter/wiki/Utilities