gtreshchev / RuntimeAudioImporter

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

Editor Utility Widget audio playback not working #54

Open parkerchristie1 opened 9 months ago

parkerchristie1 commented 9 months ago

I have been trying to play loaded audio from file & buffers in an Editor Utility Widget. All functionality for importing/exporting is working, but when trying to play the imported audio using Play Sound 2D in the Editor Utility Widget, the audio only plays for a a brief moment (less than half a second) when I select another application other than Unreal.

gtreshchev commented 9 months ago

The editor exhibits slightly different behavior in terms of GC as far as I know, and it may also potentially encounter sound playback issues because the sound wave is immediately destroyed. Please try to put your sound wave as a UPROPERTY or use another approach to mark it as a strong reference for the garbage collector in order to prevent it from being prematurely destroyed.