gtreshchev / RuntimeAudioImporter

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

Is there a way to use the toggle mute node to record more frequently in the spot? For example, every time I turn off the mute, the output won't always be su perimposed or appended to the previous audio. It needs to be a new audio every time, and there is no overlapping append #38

Closed Lemondogdog closed 1 year ago

Lemondogdog commented 1 year ago

Is there a way to use the toggle mute node to record more frequently in the spot? For example, every time I turn off the mute, the output won't always be su perimposed or appended to the previous audio. It needs to be a new audio every time, and there is no overlapping append

gtreshchev commented 1 year ago

As far as I understand, the question is that you want to capture audio data through the capturable sound wave, then mute the capture, and after unmuting, to make it possible for your sound wave to start capturing/playing back from the very beginning of your particular capture sequence, without accumulating previously captured audio data before unmute.

To achieve this, you can use the RewindPlaybackTime function with the duration of the sound wave (which you can get using the GetDuration function). Then, you can use the ReleasePlayedAudioData function to clear all the audio data inside the sound wave. Call these functions every time you want to get rid of already captured audio data.