Hi 2013/11/22 Igor Stasenko <siguctua@gmail.com>
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: anInteger anInteger = 0 ifFalse: [ self error: 'FMOD returned error code ', anInteger asString ]. Is there a more graceful way to do that?
i doubt so.. since it is library API which dictates you to use it in certain way. The proper error handling never hurts (except from causing extra code bloat, of course :)
Is it good idea to override (or create new) #nbCall: method to handle library common logic? (when any library function returns error code)