[Vala] Void*, how to deal with it
- From: Harry Van Haaren <harryhaaren gmail com>
- To: vala-list gnome org
- Subject: [Vala] Void*, how to deal with it
- Date: Wed, 30 Jun 2010 14:26:58 +0100
Hey All,
I've got a function in the JACK.vapi binding, that returns a buffer. Now it
doesnt "physically"
return the buffer, but returns a void* to the buffer.
I checked the Vala tutorial for any references to void*, and didnt find
anything...
This is the function (to be called on a Port object):
public void* get_buffer(NFrames nframes); // nframes is a uint32..
not that it matters
And this is what I tried (master_l is of Port type):
var buffer = master_l.get_buffer(nframes);
And what I want to do with this buffer is the following:
for(int i = 0; i < (uint32) nframes; i++)
{
buffer[i] = array[i]; // have an array of samples, need to write
them to this void* buffer.
}
Any suggestions..? Thanks for reading, -Harry
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]