Re: [Pharo-users] NativeBoost Questions while wrapping FMOD

2013-11-25 Thread Luc Fabresse
Hi Sean, 2013/11/25 Sean P. DeNigris > Sean P. DeNigris wrote > > I'm wrapping the FMOD cross-platform audio library > > [snip] > > I have a few more questions > > > Problem #1: > > > I have the following callout: > > > "FMOD_RESULT FMOD_System_Init( >

Re: [Pharo-users] NativeBoost Questions while wrapping FMOD

2013-11-25 Thread Igor Stasenko
On 25 November 2013 21:53, Sean P. DeNigris wrote: > Sean P. DeNigris wrote > > I'm wrapping the FMOD cross-platform audio library > > [snip] > > I have a few more questions > > > Problem #1: > > > I have the following callout: > > > "FMOD_RESULT FMOD_System_Ini

Re: [Pharo-users] NativeBoost Questions while wrapping FMOD

2013-11-25 Thread Sean P. DeNigris
Sean P. DeNigris wrote > I'm wrapping the FMOD cross-platform audio library > [snip] > I have a few more questions Problem #1: I have the following callout: "FMOD_RESULT FMOD_System_Init( FMOD_SYSTEM *system, int maxch

Re: [Pharo-users] NativeBoost Questions while wrapping FMOD

2013-11-24 Thread Stéphane Ducasse
> > On 23 November 2013 09:07, Stéphane Ducasse wrote: > I really think that NativeBoost MUST HAVE a decent documentation. > > i agree. i need to invest into it. we should build a working group with pomodoro around it. JB and Damien could help. I can play the naive idiot and editor but I cannot

Re: [Pharo-users] NativeBoost Questions while wrapping FMOD

2013-11-23 Thread Igor Stasenko
On 23 November 2013 09:07, Stéphane Ducasse wrote: > I really think that NativeBoost MUST HAVE a decent documentation. > i agree. i need to invest into it. > It is a central part of Pharo and Igor you should do something about it. > If I would know I would have written a chapter on it but I can

Re: [Pharo-users] NativeBoost Questions while wrapping FMOD

2013-11-23 Thread Igor Stasenko
On 23 November 2013 17:42, Denis Kudriashov wrote: > Hi > > 2013/11/22 Igor Stasenko > >> >> >>> 2. instead of returning useful objects, FMOD returns error codes and you >>> pass a pointer to receive the object. >>> >>> - The first consequence is that I have to wrap all the calls e.g. "self >>>

Re: [Pharo-users] NativeBoost Questions while wrapping FMOD

2013-11-23 Thread Denis Kudriashov
Hi 2013/11/22 Igor Stasenko > > >> 2. instead of returning useful objects, FMOD returns error codes and you >> pass a pointer to receive the object. >> >> - The first consequence is that I have to wrap all the calls e.g. "self >> processErrorCode: self primCreate." where >> processErrorCode:

Re: [Pharo-users] NativeBoost Questions while wrapping FMOD

2013-11-23 Thread kilon alios
However we should acknowledge here that using a FFI, any FFI , in any programming language has the mandatory requirement of knowing C. I certainly do believe that documenting Nativeboost is extremely important for helping people to port C libraries to pharo and making Pharo far more useful but we s

Re: [Pharo-users] NativeBoost Questions while wrapping FMOD

2013-11-23 Thread Stéphane Ducasse
On Nov 23, 2013, at 9:07 AM, Stéphane Ducasse wrote: > I really think that NativeBoost MUST HAVE a decent documentation. > It is a central part of Pharo and Igor you should do something about it. > If I would know I would have written a chapter on it but I cannot because I > DO NOT KNOW. And i

Re: [Pharo-users] NativeBoost Questions while wrapping FMOD

2013-11-23 Thread Stéphane Ducasse
I really think that NativeBoost MUST HAVE a decent documentation. It is a central part of Pharo and Igor you should do something about it. If I would know I would have written a chapter on it but I cannot because I DO NOT KNOW. Stef > > > > On 21 November 2013 22:40, Sean P. DeNigris wrote:

Re: [Pharo-users] NativeBoost Questions while wrapping FMOD

2013-11-22 Thread Igor Stasenko
So, here the changes which should work (but i didn't tested). And being on your place, i would get rid of FMOD_SYSTEM class, because you can just subclass FmodSystem from NBExternalObject directly (and use it in signatures) and so it will be holding the handle, and naturally work as a representat

Re: [Pharo-users] NativeBoost Questions while wrapping FMOD

2013-11-22 Thread Igor Stasenko
On 22 November 2013 05:09, Sean P. DeNigris wrote: > Igor Stasenko wrote > >> The better way is to subclass from NBExternalObject then > > which made exactly for such purposes, by holding an opaque handle to > > something (you don't care what is inside), and simplifies a lot of > things. > > I ma

Re: [Pharo-users] NativeBoost Questions while wrapping FMOD

2013-11-21 Thread Sean P. DeNigris
Igor Stasenko wrote >> The better way is to subclass from NBExternalObject then > which made exactly for such purposes, by holding an opaque handle to > something (you don't care what is inside), and simplifies a lot of things. I made "NBExternalObject subclass: #FMOD_SYSTEM". I then tried to use

Re: [Pharo-users] NativeBoost Questions while wrapping FMOD

2013-11-21 Thread Igor Stasenko
On 22 November 2013 01:23, Sean P. DeNigris wrote: > Igor Stasenko wrote > >> err.. again, you must pass an address where value will be stored, > > hee hee... sorry... I don't understand enough of what's going on behind the > scenes to adapt well. I reasoned that since last time, the signature wa

Re: [Pharo-users] NativeBoost Questions while wrapping FMOD

2013-11-21 Thread Sean P. DeNigris
Igor Stasenko wrote >> err.. again, you must pass an address where value will be stored, hee hee... sorry... I don't understand enough of what's going on behind the scenes to adapt well. I reasoned that since last time, the signature was "Whatever**" and you said to make it "NBExternalAddress*", t

Re: [Pharo-users] NativeBoost Questions while wrapping FMOD

2013-11-21 Thread Igor Stasenko
On 21 November 2013 22:40, Sean P. DeNigris 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: channelHa

Re: [Pharo-users] NativeBoost Questions while wrapping FMOD

2013-11-21 Thread p...@highoctane.be
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:p...@highoctane.be | Web: http://philippeback.eu Blog: ht