On Fri, January 27, 2017 7:54 am, fredvs wrote: > > I am not sure that a array of byte is what op_test_memory want. > It is not a pipe (like lot of other audio lib use), if it is not a array > of byte, what does he want...? >
C doesn't even really have arrays since it is so low level (well this is disputed). Often an API function that accepts a buffer could allow multiple types of buffers, that you allocate yourself... Make sure the function doesn't modify the buffer size (bad api practice) and make you allocate the memory It just seems like this is similar to windows API programming where the windows C api would allow a fixed array of byte (or similar), or your own allocated heap array.... i.e. whatever you want. Advantage of heap array is you can change it; fixed static stack array is fixed and not modifiable on heap... But make sure the api doesn't muck with the buffer on it's end or try to allocate memory for it, as that should be your job. But you never know with some api's. This should all be in their docs? They don't have proper docs? But I know nothing of Opus, sorry. (and can you look into the actual source code of opus or is this closed source?) _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal