Free Pascal - General mailing list wrote
> According to the code it also returns 0 with icy_meta being Nil if there
> is no corresponding data:
> https://github.com/georgi/mpg123/blob/master/src/libmpg123/libmpg123.c#L1384
Ha, nice, you did find the only doc available : the source code (that
conta
On 16.04.2017 18:52, fredvs wrote:
> Free Pascal - General mailing list wrote
>> function mpg123_icy(mh: Tmpg123_handle; var icy_meta: PChar): Integer;
>> cdecl;
>
> Thanks for your answer.
>
> I did try with this but :
>
> res := mpg123_icy(mph,theicytag);
>
> if (res = 0) then writeln('resu
>And how you'll need to use it will depend upon the function's documentation
Huh, you did not know ?
With audio libraries there is a law: NO doc (other that the C header) and NO
demos.
So you must guess and explore all by your self.
Fre;D
-
Many thanks ;-)
--
View this message in context
Bart-48 wrote
> If you know that res equals 0, then a simple writeln('resu = 0'); would
> suffice.
> Second, there is no need do an inttostr(res) inside write(ln).
> Write(ln) is perfectly capable of writing integers (as it has been
Huh, of course I know all this, sorry, I just mixed copy paste of
On 4/16/17, fredvs wrote:
> if (res = 0) then writeln('resu = ' + inttostr(res)); // OK = 0
That just creams my corn!
If you know that res equals 0, then a simple writeln('resu = 0'); would suffice.
Second, there is no need do an inttostr(res) inside write(ln).
Write(ln) is perfectly capable o
Free Pascal - General mailing list wrote
> function mpg123_icy(mh: Tmpg123_handle; var icy_meta: PChar): Integer;
> cdecl;
Thanks for your answer.
I did try with this but :
res := mpg123_icy(mph,theicytag);
if (res = 0) then writeln('resu = ' + inttostr(res)); // OK = 0
if Assigned(theicyta
Christo Crause wrote
> I suppose you have to allocate memory and create a pointer to a pointer to
> this memory which you pass to the function.
Hello and thanks for answer.
Huh, ok, but how do you do this by code ?
Fre;D
-
Many thanks ;-)
--
View this message in context:
http://free-pas
On 16.04.2017 16:58, fredvs wrote:
> Hello.
>
> A C method is defined like this:
>
> MPG123_EXPORT int mpg123_icy(mpg123_handle *mh, char **icy_meta);
>
> and translated in Pascal with this:
>
> function mpg123_icy(mh: Tmpg123_handle; var icy_meta: PPChar): integer;
> cdecl;
This is wrong. "va
Free Pascal - General mailing list wrote
> resu := mpg123_icy(ahandle, theicytag);
> if (resu = 0) and Assigned(theicytag) and Assigned(theicytag^)
> then writeln(theicytag^);
Hello and thanks for answer.
Indeed, that way no more crash but also nothing from writeln(theicytag^).
I did a check wi
I suppose you have to allocate memory and create a pointer to a pointer to
this memory which you pass to the function.
On 16 Apr 2017 4:58 PM, "fredvs" wrote:
> Hello.
>
> A C method is defined like this:
>
> MPG123_EXPORT int mpg123_icy(mpg123_handle *mh, char **icy_meta);
>
> and translated in
On 04/16/2017 10:58 AM, fredvs wrote:
K, the function seems to work because the result = 0 (no error).
But how to retrieve the data icy_meta (PPChar) ?
var
theicytag : PPChar;
resu : integer;
...
resu := mpg123_icy(ahandle, theicytag);
if resu = 0 then writeln(theicytag^); --> raise exception
Hello.
A C method is defined like this:
MPG123_EXPORT int mpg123_icy(mpg123_handle *mh, char **icy_meta);
and translated in Pascal with this:
function mpg123_icy(mh: Tmpg123_handle; var icy_meta: PPChar): integer;
cdecl;
OK, the function seems to work because the result = 0 (no error).
But ho
12 matches
Mail list logo