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. |
|
|
#1 | Link |
|
German doom9/Gleitz SuMo
Join Date: Oct 2001
Location: Germany, Gardelegen
Posts: 1,464
|
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. |
|
|
|
|
|
#2 | Link |
|
BeSweet Author
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).
__________________
FAQs : BeSweet, Audio :readfaq: Homepage : DSPguru's Webpage http://dspguru.notrace.dk/cs.gif Guides : Multilingual Guides of my tools http://dspguru.notrace.dk/1zhelp.gif |
|
|
|
|
|
#3 | Link |
|
German doom9/Gleitz SuMo
Join Date: Oct 2001
Location: Germany, Gardelegen
Posts: 1,464
|
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).
|
|
|
|
|
|
#4 | Link |
|
BeSweet Author
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.
__________________
FAQs : BeSweet, Audio :readfaq: Homepage : DSPguru's Webpage http://dspguru.notrace.dk/cs.gif Guides : Multilingual Guides of my tools http://dspguru.notrace.dk/1zhelp.gif Last edited by DSPguru; 27th December 2001 at 18:32. |
|
|
|
|
|
#5 | Link |
|
German doom9/Gleitz SuMo
Join Date: Oct 2001
Location: Germany, Gardelegen
Posts: 1,464
|
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
|
|
|
|
|
|
#6 | Link |
|
BeSweet Author
Join Date: Oct 2001
Location: On top of a supercompact cardinal
Posts: 3,506
|
good luck !
__________________
FAQs : BeSweet, Audio :readfaq: Homepage : DSPguru's Webpage http://dspguru.notrace.dk/cs.gif Guides : Multilingual Guides of my tools http://dspguru.notrace.dk/1zhelp.gif |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|