using deimos.portaudio

2012-05-18 Thread Samuele Carcagno
Hi, I'm try to use the deimos portaudio bindings https://github.com/D-Programming-Deimos/portaudio I've managed to compile and run the test demo provided with the module. It seems to work fine. However, when I add this statement: PaStreamParameters outputParameters; that I need to specify t

Re: using deimos.portaudio

2012-05-18 Thread Samuele Carcagno
On Saturday, 19 May 2012 at 02:54:22 UTC, 1100110 wrote: On Fri, 18 May 2012 21:31:57 -0500, Samuele Carcagno wrote: Pa_OpenStream Does the result of calling Pa_GetVersionText() closely match the version of the library installed on your computer? I use Debian as well, and it'

Re: using deimos.portaudio

2012-05-18 Thread Samuele Carcagno
I get the same error on debian wheezy where the portaudio version is: PortAudio V19-devel (built Dec 7 2011 23:15:44) dmd pa_test2.d -L-lportaudio pa_test2.o: In function `_Dmain': pa_test2.d:(.text._Dmain+0x22): undefined reference to `_D6deimos9portaudio18PaStreamParameters6__initZ' collect

Re: using deimos.portaudio

2012-05-19 Thread Samuele Carcagno
The missing symbol is a D symbol. You probably have to compile in 'deimos/portaudio.di', so in your 'dmd yourprogram.d' compile command add the full path to the di file: 'dmd yourprogram.d ../path/to/deimos/portaudio.di' Thanks, that was in fact the problem!

Associative array of dynamic array

2012-09-09 Thread Samuele Carcagno
I would like to create an associative array that maps a string to a multidimensional dynamic array. In other words, I would like a data structure where I can access elements like this: foo["key"][0][0] Is this possible? If so I'm having trouble figuring out the correct syntax, the following (

Re: Associative array of dynamic array

2012-09-09 Thread Samuele Carcagno
thanks a lot! both solutions work, to initialize the arrays of int I'm doing: int[][][string] foo; foo["key"] = new int[][](6,6); foo["key"][0][0] = 5; it seems to work.

Find indexes of elements matching a given value in an array

2012-09-09 Thread Samuele Carcagno
I would like to find the indexes of all the elements of an array matching a certain value. I could simply loop over all the elements to do the job, but I was hoping for some ready made function that also works across different types (ints, floats etc...). I saw the countUntil function in std.

Re: Find indexes of elements matching a given value in an array

2012-09-10 Thread Samuele Carcagno
Thank you guys, that's fantastic! I'll try out your functions.

append element to variantArray

2012-09-26 Thread Samuele Carcagno
Is it possible to append elements to a variantArray after it has been created? I have tuples of type: alias Tuple!(float[][][string], "data", ulong[string], "nSegs") aveNSegsTuple; I would like to append these tuples to a variantArray in a for loop, as more results come in. Thank you in ad