Closed Motanum closed 2 years ago
Hi. These "features" exist because of the use of USoundWaveProdecural, which has some limitations.
"On Audio Finished" is called only when the imported sound wave has completely finished playing. It is not called if playback has been interrupted externally (this cannot be handled inside the sound wave). Its purpose is to keep track of when the sound wave has completely finished playing.
In order to "reset" the playback of the sound wave, you need to use the "Rewind Playback Time" function and set the time to "0". Read more about this approach here.
In case you don't want to feel these peculiarities of working with a sound wave, you can convert it to a standard sound wave, which will work identically as imported into the editor in a standard way. Read more about it here.
Thanks so much! It now behaves as I expect.
My only question is, to the Compressed Sound Wave, is there a way to make it a looping sound in blueprint?
Yes, it is possible, but so far only in C++ manually.
In the next update, I will make it possible to select this parameter when calling the function to compress the sound wave.
Cool! My project is C++, what is the function to call?
Thanks so much for the quick replies too!
Hi, if you use C++ then you just need to set the "bLooping" property to "true" in the compressed sound wave.
But in the next update I will make it possible to do this automatically through the "CompressSoundWave" function.
Hi, this feature has been implemented. You can download the latest plugin source and fill in the "Looping" parameter when compressing the sound wave.
I downloaded it, but I cant compile my game.
GAME/Plugins/RuntimeAudioImporter/Source/RuntimeAudioImporter/Public/RuntimeAudioImporterLibrary.h(111): error : C++ Default parameter not parsed: CompressedSoundWaveInfo "FCompressedSoundWaveInfo()"
It seems that something is wrong in the 4.27 version when parsing some specific ufunction headers. Should be ok now.
Absolute MVP!
Thanks so much!
I downloaded the plug in, and used it to load a audio wav file not included as a UAsset. I managed to get it to work and to play, but I noticed that it wont properly work as normal UAssets. There are 2 important cases for me that I need to be able to handle correctly.
1, When the wav stops playing, it wont trigger the 'On Audio Finished' event from the AudioComponent.
This means, that if the audio finished playing. it won't stop itself. And even if I do stop it myself, and then do a play again, the audio will just try to keep playing beyond which is just pure silence.
This is how I am getting the song.
I don't know what I could be doing wrong.