We'll soon be able to do this in Pharo then :-)

My friend David also uses FMOD in there.

http://www.youtube.com/watch?v=077sYFHAgTM

---
Philippe Back
Dramatic Performance Improvements
Mob: +32(0) 478 650 140 | Fax: +32 (0) 70 408 027
Mail:phil@highoctane.be | Web: http://philippeback.eu
Blog: http://philippeback.be | Twitter: @philippeback
Youtube: http://www.youtube.com/user/philippeback/videos

High Octane SPRL
rue cour Boisacq 101 | 1301 Bierges | Belgium

Pharo Consortium Member -�http://consortium.pharo.org/
Featured on the Software Process and Measurement Cast -�http://spamcast.libsyn.com
Sparx Systems Enterprise Architect and Ability Engineering EADocX Value Added Reseller



On Thu, Nov 21, 2013 at 10:40 PM, Sean P. DeNigris <sean@clipperadams.com> wrote:
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.

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.