[Pharo-dev] NativeBoost: Documentation Suggestion and Question

Sean P. DeNigris sean at clipperadams.com
Wed Nov 13 00:11:27 EST 2013


Sean P. DeNigris wrote
> I'll let you know how it turns out.

Okay, I got a little further. I can initialize and terminate the library.
Yahoo!!

To load the very basic spike:
    Gofer it
	smalltalkhubUser: 'SeanDeNigris' project: 'PortAudio';
	package: 'PortAudio';
	load.

My next task is to call...
	PaError Pa_OpenDefaultStream(PaStream ** 	stream, "PaStream is typedef for
void"
		int 	numInputChannels,
		int 	numOutputChannels,
		ulong 	sampleFormat,
		double 	sampleRate,
		ulong 	framesPerBuffer,
		PaStreamCallback 	streamCallback,
		void * 	userData) (see
http://portaudio.com/docs/v19-doxydocs/open_default_stream.html)

The first argument is most perplexing to me. I haven't seen any NativeBoost
examples of pointers to pointers. In fact, with pointers to values, it seems
random whether they are derefenced when described in NB.

For example:
  cairo_t* cairo_create (cairo_surface_t *target);
becomes (from the IWST paper):
  self nbCall: #(
AthensCairoCanvas cairo_create (
                  AthensCairoSurface cairoSurface))

Notice the argument is dereferenced in the NB version.

But (also from the IWST paper):
  "void cairo_matrix_multiply (
                     cairo_matrix_t *result,
                     const cairo_matrix_t *a,
                     const cairo_matrix_t *b );"
becomes:
  self nbCall: #(void cairo_matrix_multiply (AthensCairoMatrix * self,
AthensCairoMatrix * m , AthensCairoMatrix * self ) )

In this case, none of the arguments are defererenced.

Anyway, I'd reeeeeally appreciate it if someone would load the code and see
what the problem is.

"PortAudio example" will run the demo script I'm translating from the
library docs into Pharo.

Thanks in advance...



-----
Cheers,
Sean
--
View this message in context: http://forum.world.st/NativeBoost-Documentation-Suggestion-and-Question-tp4720805p4721585.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.




More information about the Pharo-dev mailing list