I'm wrapping the FMOD cross-platform audio library. The code is MIT and lives
at http://smalltalkhub.com/#!/~SeanDeNigris/FMOD
========
Problem #1:
========
I'm calling into the FMOD library with:
primStoreIsPlaying: channelHandle in: isPlayingHandle
�� �� �� �� <primitive: #primitiveNativeCall module: #NativeBoostPlugin>
�� �� �� �� "FMOD_RESULT FMOD_Channel_IsPlaying(
�� �� �� �� �� �� �� �� FMOD_CHANNEL *channel,
�� �� �� �� �� �� �� �� bool *isplaying);"
�� �� �� �� ^ self nbCall: #(FMOD_RESULT FMOD_Channel_IsPlaying(NBExternalAddress
channel, NBExternalAddress isPlayingHandle)).
I call the above with:
�� �� isPlaying
�� �� �� �� | isPlaying |
�� �� �� �� isPlaying := NBExternalAddress new.
�� �� �� �� self primStoreIsPlaying: channel in: isPlaying.
�� �� �� �� ^ isPlaying value > 0.
isPlaying is always 0. The method works directly from C with:
int isPlaying = 1;
�� �� while (isPlaying) {
�� �� �� �� FMOD_Channel_IsPlaying(channel, &isPlaying);
�� �� }
I also tried changing the callout signature to "... bool* isPlayingHandle)"
and passing "isPlaying := true." instead of using the NBExternalAddress
stuff.
NBExternalAddress channel, NBExternalAddress * isPlayingHandle)).
I have a few more questions, but this is the most pressing as it's holding
up any further development.
Thanks!
-----
Cheers,
Sean
--
View this message in context: http://forum.world.st/NativeBoost-Questions-while-wrapping-FMOD-tp4724116.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.