x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

OnAudioFinished not called for USoundWaveProcedural

I have a class extended from USoundWaveProcedural:

 // HEADER
 UCLASS()
 class UMySoundWave : public USoundWaveProcedural
 {
     GENERATED_UCLASS_BODY()
 
     public:
         bool Initialize();
 };
 
 //CODE
 UMySoundWave::UMySoundWave(const FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer) {}
 
 bool UMySoundWave::Initialize()
 {
     uint32 BytesRead;
     uint8 *AudioBuffer = ...;// HERE: GENERATE PCM DATA AND FILL BytesRead
     
     NumChannels = 1;
     SampleRate = 44100;
     Duration = (BytesRead / 2) / 44100.0;
     SoundGroup = SOUNDGROUP_Voice;
         
     QueueAudio(AudioBuffer, BytesRead);
         
     delete AudioBuffer;
 
     return true;
 }

The problem is when I use SpawnSoundAttached with this sound, OnAudioFinished never called.

Product Version: UE 4.21
Tags:
more ▼

asked Nov 30 '18 at 09:30 PM in C++ Programming

avatar image

yar3333
31 3 1

avatar image faetell Feb 03 '19 at 04:13 AM

Did you ever figure this out?

I've been struggling with the same issue for the past few days now. I'm considering just putting in a delayed event where the delay = the length of the audio, but that just feels sloppy...

avatar image yar3333 Feb 03 '19 at 08:11 AM

I did the same - timer as a solution/workaround.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question