> op_open_memory() is buggy.
> (But maybe I m wrong...).
Yes I was wrong.
Opus needs a bigger buffer than mp3, increasing the size fixed it.
It works, sound is perfect from a https too.
Only remain a problem: after 10 seconds of playing, op_read_float() does not
give output.
I must study deep
Hello Lars.
Many thanks to spent your time for us.
But after lot of test and re-test, my conclusion is:
op_open_memory() is buggy.
It looses the pointer assigned to the input-buffer of bytes.
And when using op_read() it points to nil in place of buffer-in.
Voila.
(But maybe I m wrong...).
F
On Sun, January 29, 2017 4:45 am, fredvs wrote:
> Hello Lars.
>
>
> Thanks for your brilliant light.
>
>
>> (and can you look into the actual source code of opus or is this closed
>> source?)
>
> ==> https://github.com/xiph/opus
>
Well the function you were using with a buffer is here:
https://
Am 29.01.2017 23:33 schrieb "Lars" :
>
> On Sun, January 29, 2017 6:04 am, José Mejuto wrote:
> > El 28/01/2017 a las 13:32, fredvs escribió:
> >
> >
> >> TOpusFileCallbacks = record
> >> read: op_read_func;
> >> seek: op_seek_func;
> >> tell: op_tell_func;
> >> close: op_close_func;
> >> end;
> >
On Sun, January 29, 2017 6:04 am, José Mejuto wrote:
> El 28/01/2017 a las 13:32, fredvs escribió:
>
>
>> TOpusFileCallbacks = record
>> read: op_read_func;
>> seek: op_seek_func;
>> tell: op_tell_func;
>> close: op_close_func;
>> end;
>>
>> This does not work:
>>
>>
>> HandleOP := op_test_callbac
@ Lars:
The library used for op_memory_open and op_seek is libopusfile.so:
https://github.com/xiph/opusfile
Translation into fpc-Pascal of the header:
https://github.com/fredvs/uos/blob/master/src/uos_opusfile.pas
And Opusfile.so depends on libopus.so :
https://github.com/xiph/opus
Translatio
> you should specify {$PACKRECORDS C}
Nice tip !
Added in each unit that deal with c libraries.
Many hanks.
Fre;D
PS: But this did not help ;-(
-
Many thanks ;-)
--
View this message in context:
http://free-pascal-general.1045716.n5.nabble.com/Pipe-vs-Memory-buffer-tp5727435p5727494.h
El 28/01/2017 a las 13:32, fredvs escribió:
TOpusFileCallbacks = record
read: op_read_func;
seek: op_seek_func;
tell: op_tell_func;
close: op_close_func;
end;
This does not work:
HandleOP := op_test_callbacks(pointer(InPipe),op_callbacks, BufferURL[0],
PipeBufferSize, err);
Hello Lars.
Thanks for your brilliant light.
> (and can you look into the actual source code of opus or is this closed
> source?)
==> https://github.com/xiph/opus
And translation into fpc-Pascal:
==> https://github.com/fredvs/uos/blob/master/src/uos_opusfile.pas
Fre;D
-
Many thanks
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 i
Hello.
Some other news from the front:
var
BufferURL, buffadd: tbytes;
...
setlength(BufferURL, PipeBufferSize);
setlength(buffadd, PipeBufferSize);
CreatePipeHandles(InHandle, OutHandle, PipeBufferSize);
InPipe := TInputPipeStream.Create(InHandle);
OutPipe := TOutputPipeStream.
Hello.
> Some streams requires you set its cursor to 0 before writing/reading
> buffer, so you need to check it:
> OutPipe.Seek(0, soBeginning);
> InPipe.Seek(0, soBeginning);
> InPipe.Read(BufferURL[0],PipeBufferSize);
=>
"Exception at 0043A720: EPipeSeek:
Cannot seek on pipes."
>
El 27/01/2017 a las 3:52, fredvs escribió:
Hello Silvio:
Yes, we are on the good way.
Following your advice, here from https-url-opus the result of :
Hello,
The first thing to debug this problems is to determine the expected data
for opus_test_memory. Usually streams (audio, video, etc...)
On Thu, Jan 26, 2017 at 11:52 PM, fredvs wrote:
> Hello Silvio:
>
> Yes, we are on the good way.
>
Awesome. :-)
> Following your advice, here from https-url-opus the result of :
>
> var
> BufferURL: tbytes;
>
> setlength(BufferURL, PipeBufferSize);
> CreatePipeHandles(InHandle, OutHandle
Hello Silvio:
Yes, we are on the good way.
Following your advice, here from https-url-opus the result of :
var
BufferURL: tbytes;
setlength(BufferURL, PipeBufferSize);
CreatePipeHandles(InHandle, OutHandle, PipeBufferSize);
InPipe := TInputPipeStream.Create(InHandle);
OutPipe := TOutpu
Thanks Silvio, I will try it tonight.
Write you later.
Fre;D
-
Many thanks ;-)
--
View this message in context:
http://free-pascal-general.1045716.n5.nabble.com/Pipe-vs-Memory-buffer-tp5727435p5727457.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.
On Thu, Jan 26, 2017 at 8:20 PM, fredvs wrote:
> Hello.
>
> Some news from the front:
>
> var
> BufferURL : array of float;
>
> .
>
> PipeBufferSize := $4000 ;
>
> CreatePipeHandles(InHandle, OutHandle, PipeBufferSize);
>
> InPipe := TInputPipeStream.Create(InHandle);
> OutPipe := TOutputPipe
Hello.
Some news from the front:
var
BufferURL : array of float;
.
PipeBufferSize := $4000 ;
CreatePipeHandles(InHandle, OutHandle, PipeBufferSize);
InPipe := TInputPipeStream.Create(InHandle);
OutPipe := TOutputPipeStream.Create(OutHandle);
httpget := TThreadHttpGetter.Create(opus_ur
> didn't understand the software structure / problem behind the C->
> Pascal translation
Huh, IMO, the translation is ok.
The problem is that the method ask for a memory buffer and I give a pipe.
> but for me named pipes work very well for many kinds of interprocess
> communication.
Yes, for ex
Hello Fred,
I didn't understand the software structure / problem behind the C->
Pascal translation, but for me named pipes work very well for many kinds
of interprocess communication.
Markus
Am 25.01.2017 um 23:13 schrieb fredvs:
Hello
In a C method:
OP_WARN_UNUSED_RESULT OggOpusFile
Thanks Michael.
OK, I know the way, I will try it (but code example is very welcome).
Fre;D
-
Many thanks ;-)
--
View this message in context:
http://free-pascal-general.1045716.n5.nabble.com/Pipe-vs-Memory-buffer-tp5727435p5727444.html
Sent from the Free Pascal - General mailing list arc
On Wed, 25 Jan 2017, fredvs wrote:
That will never work.
OP_WARN_UNUSED_RESULT OggOpusFile *op_test_memory(const unsigned char
*_data, size_t _size,int *_error);
expects a memory buffer; you cannot pass it a stream.
Ha, ok.
And how to convert a pipe into a memory buffer ?
Read from
>That will never work.
> OP_WARN_UNUSED_RESULT OggOpusFile *op_test_memory(const unsigned char
> *_data, size_t _size,int *_error);
> expects a memory buffer; you cannot pass it a stream.
Ha, ok.
And how to convert a pipe into a memory buffer ?
Thanks.
Fre;D
-
Many thanks ;-)
--
Vi
On Wed, 25 Jan 2017, fredvs wrote:
Hello
In a C method:
OP_WARN_UNUSED_RESULT OggOpusFile *op_test_memory(const unsigned char
*_data,
size_t _size,int *_error);
translated in Pascal with this:
var
op_test_memory: function(const _data; const size: cuint; out error: cint):
TOggOpusFile;
How
24 matches
Mail list logo