Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Programming and Hacking > Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 20th December 2001, 20:21   #1  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,888
Using AZID.DLL with Delphi - who can help?

Dear friends,

I'm trying hard to use the AZID.DLL in an own Delphi program. But I get very strange problems, so I hope someone has much experience in both C and Delphi and can give me good hints how to solve them.

As far as I found out, "cdecl" calling mode is required, and the "int" fields in the ac3opts record really are longint wide. Now my problem is the callback function in ac3_readframe: The buffer address is not the same as the address of the allocated buffer, instead it jumps around like crazy but each time seems to request 1 byte. On request I could give you more details - but please announce private help first, I don't want to discuss every detail here.
LigH is offline   Reply With Quote
Old 24th December 2001, 10:46   #2  |  Link
DSPguru
BeSweet Author
 
DSPguru's Avatar
 
Join Date: Oct 2001
Location: On top of a supercompact cardinal
Posts: 3,506

hi LigH !
azid will read 1 byte after 1 byte until he finds the syncinfo, then it will read 4 bytes (in order to find the frame size), and then it will read the whold frame (hundreds of bytes).
DSPguru is offline   Reply With Quote
Old 26th December 2001, 10:03   #3  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,888

It read 1 byte at least a hundred times (before I got tired to run my program step by step and let it run from there) - after minutes it was still reading, and all I could do was kill the process. And each time it reads one byte, it reads it to a different address, and this address is not the location of the allocated buffer - that's what I call strange. I guess I forgot one pointer dereferencing; I'll try again and tell you more soon (currently I'm not at home).
LigH is offline   Reply With Quote
Old 27th December 2001, 18:29   #4  |  Link
DSPguru
BeSweet Author
 
DSPguru's Avatar
 
Join Date: Oct 2001
Location: On top of a supercompact cardinal
Posts: 3,506
it will keep on reading byte after byte unless it finds syncword. (2 bytes total), than it will read the rest of syncinfo (4 more bytes), and then it will read the whole frame into the buffer you supplied.

Last edited by DSPguru; 27th December 2001 at 18:32.
DSPguru is offline   Reply With Quote
Old 28th December 2001, 16:53   #5  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,888

He, DSPguru, I'm not stupid - I already got your first message

And I also was true - I just forgot to dereference a pointer (therefore I read from the file not into the buffer, but over the buffer address). Problem found and solved... on to the next one
LigH is offline   Reply With Quote
Old 28th December 2001, 17:24   #6  |  Link
DSPguru
BeSweet Author
 
DSPguru's Avatar
 
Join Date: Oct 2001
Location: On top of a supercompact cardinal
Posts: 3,506

good luck !
DSPguru is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 21:04.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.