<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Jan 20, 2017 at 7:11 PM, fredvs <span dir="ltr"><<a href="mailto:fiens@hotmail.com" target="_blank">fiens@hotmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello Silvio.<br>
<br>
Wow, thanks, I will study it deep.<br>
<br>
By the way, the Opus Pascal wrappers are working.<br>
You may listen, seek, saving to file, apply dsp,.. to Opus files.<br>
You may try SimplePlayer demo in uos (all libraries and Opus-audiofile<br>
included):<br>
<br>
<a href="https://github.com/fredvs/uos" rel="noreferrer" target="_blank">https://github.com/fredvs/uos</a><br>
<br>
PS: BufferIn is working only if it is a array of cfloat (from ctypes.pas).<br>
With array of double, array of float,.. it does not work.</blockquote><div><br></div><div>Yes, because C `float`'s size is 4, and Pascal `double`'s, 8. Pascal `cfloat` is just a alias to `single`, 4. :-) Try two tests:</div><div><br></div><div><font face="monospace, monospace" size="1">$ echo -e '#include <stdio.h>\nint main(){printf("size of float: %zu\\n", sizeof(float));return 0;}' > fredvs.c && gcc -o fredvs fredvs.c && clear && ./fredvs # it prints "size of float: 4" on your terminal</font><br></div><div><br></div><div>and:</div><div><br></div><div><font face="monospace, monospace" size="1">$ echo "program fredvs;begin writeln('sizeof double: ', sizeof(double));writeln('size of single: ', sizeof(single));end." > fredvs.pp && fpc fredvs.pp && clear && ./fredvs # it prints "sizeof double: 8" and "size of single: 4" on your terminal</font><br></div><div><br></div><div>Some useful links:</div><div><br></div><div>FPC Real types: <a href="http://freepascal.org/docs-html/ref/refsu6.html#x28-310003.1.2">http://freepascal.org/docs-html/ref/refsu6.html#x28-310003.1.2</a><br></div><div>C - Data Types: <a href="https://www.tutorialspoint.com/cprogramming/c_data_types.htm">https://www.tutorialspoint.com/cprogramming/c_data_types.htm</a><br></div><div>Delphi to C++ types mapping: <a href="http://docwiki.embarcadero.com/RADStudio/Berlin/en/Delphi_to_C%2B%2B_types_mapping">http://docwiki.embarcadero.com/RADStudio/Berlin/en/Delphi_to_C%2B%2B_types_mapping</a><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">
Fre;D<br>
<br>
-----<br>
Many thanks ;-)</span></blockquote><div> </div></div>-- <br><div class="gmail_signature"><div dir="ltr"><div>Silvio Clécio</div></div></div>
</div></div>