thanks for your help, the solution i used was this one:<br><br>#include <boost/python.hpp><br>#include <boost/python/suite/indexing/vector_indexing_suite.hpp><br>using namespace boost::python;<br><br>tuple py_audio_get_recording_buffer() {<br>
int write_ptr = 0;<br> std::vector<float> buffer = audio_get_recording_buffer(write_ptr);<br> return make_tuple(buffer, write_ptr);<br>}<br><br>BOOST_PYTHON_MODULE(nucleus) {<br> class_< std::vector<float> >("vector_float")<br>
.def(vector_indexing_suite< std::vector<float> >());<br><br> def("get_recording_buffer", py_audio_get_recording_buffer);<br>}<br><br><br><div class="gmail_quote">On Thu, Oct 23, 2008 at 4:03 PM, Stefan Seefeld <span dir="ltr"><<a href="mailto:seefeld@sympatico.ca">seefeld@sympatico.ca</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">object get_recording_buffer_wrapper()<br>
{<br>
size_t write_ptr;<br>
std::vector<float> buffer = get_recording_buffer(write_ptr);<br>
list l;<br>
for (std::vector::iterator i = buffer.begin(); i != buffer.end(); ++i)<br>
l.append(*i);<br>
return make_tuple(l, write_ptr);<br>
}<br>
<br>
<br>
HTH,<br>
Stefan<br><font color="#888888">
<br>
-- <br>
<br>
...ich hab' noch einen Koffer in Berlin...<br>
<br>
_______________________________________________<br>
Cplusplus-sig mailing list<br>
<a href="mailto:Cplusplus-sig@python.org" target="_blank">Cplusplus-sig@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/cplusplus-sig" target="_blank">http://mail.python.org/mailman/listinfo/cplusplus-sig</a><br>
</font></blockquote></div><br>