Thanks for the amazing response! Sad that you got told on by someone in legal, haha. I would love to see those tutorials! The sooner, the better. I’m trying to work on audio for my project, and the threading changes you mentioned are too awesome to not start playing with! I’m still very early in my UE4 knowledge and trying to wrap my head around still understanding what you’re trying to suggest to me, so I’ll explain my understanding and hopefully you can correct me if I’m wrong.
First off, the technical understanding. If I don’t understand this, I’m not getting anywhere.
- You want us to create our own function GenerateAudio() function… in our child class as the most convenient.
- You want us to add data via QueueAudio(const uint8* AudioData, const int32 BufferSize).
So, here’s a sinusoidal GenerateAudioData function:
I’m supposing that this is acceptable. If I have a raw file format, I’m supposing that I’m just going to have to use GMalloc to allocate the appropriate data there and just load it up directly into memory, then I can play with the data there, and then send a pointer to the start of the array.
I’m just going to register the function like so:
Hm. I had my hopes up there. Thanks for your response so far, I’ve made a lot of progress so far.
Edit: made loop faster, fixed GenerateAudioData
Editx2: I think I made the code acceptable now.