I have 3rd party code which gives me raw PCM audio data which I need to play. Haven’t found any code that can do that in your current API. With little digging into Wwise documentaion I found that it can potentially do it with extra arguments given to AK::SoundEngine::PostEvent according to this page.
Is there another way for playing raw PCM data, or do you have any plans to implement this feature ?
I believe the “ExternalSources” in the context of the PostEvent api is intended for loose sound files, those that aren’t packaged into a sound bank. The AkExternalSourceInfo structure needs to be filled with a Codec ID, file path, pointer to in-memory location, a File ID, etc. So if this is not your use case, you may want to look into Audio Input Source. This acts as a normal sound, you can create Play and Stop events for it in Wwise and use it as a normal ATL Trigger. It is up to the user to set up the callbacks in order to feed PCM data to Wwise.
However, Lumberyard currently doesn’t provide support for this, but we’re working on it! You can certainly stay tuned for that update. Or if you want to hook it up yourself, you would need to implement your own AkAudioInputPluginGetFormatCallbackFunc and AkAudioInputPluginExecuteCallbackFunc to copy the PCM samples into the buffer that Wwise provides.
Hope this helps!