You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a use case where I am being provided with a stream of PCM audio bytes (from video decoding) and I want to play the sound over the user's speakers. OpenFL doesn't provide a means to implement this (I checked, this class is not implemented on most platforms, just Flash). Thankfully, FMod does, but haxe-fmod has not implemented a user-facing interface for it.
Implement the ability to create a sound which, rather than loading from a sound file, continuously executes a callback to retrieve the sound data to be output.
The sound should be created with the FMOD_OPENUSER, and be initialized with an FMOD_CREATESOUNDEXINFO to specify format, defaultfrequency, numchannels, and a read callback. The read callback would probably need to be a wrapper callback, which would call a Haxe function (not a CPP function) provided by the user, which would return an openfl.utils.ByteArray. The wrapper callback would then provide the pointer and length to the sound for playback.
See the api/core/examples/user_created_sound.cpp for an example of this, but in CPP rather than Haxe.
The text was updated successfully, but these errors were encountered:
I have a use case where I am being provided with a stream of PCM audio bytes (from video decoding) and I want to play the sound over the user's speakers. OpenFL doesn't provide a means to implement this (I checked, this class is not implemented on most platforms, just Flash). Thankfully, FMod does, but haxe-fmod has not implemented a user-facing interface for it.
Implement the ability to create a sound which, rather than loading from a sound file, continuously executes a callback to retrieve the sound data to be output.
The sound should be created with the
FMOD_OPENUSER
, and be initialized with an FMOD_CREATESOUNDEXINFO to specify format, defaultfrequency, numchannels, and a read callback. The read callback would probably need to be a wrapper callback, which would call a Haxe function (not a CPP function) provided by the user, which would return anopenfl.utils.ByteArray
. The wrapper callback would then provide the pointer and length to the sound for playback.See the
api/core/examples/user_created_sound.cpp
for an example of this, but in CPP rather than Haxe.The text was updated successfully, but these errors were encountered: