BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

AVIStreamRead failes : AVIERR_ERROR

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Multimedia
View previous topic :: View next topic  
Author Message
Kyle Katarn
Guest





PostPosted: Thu Mar 08, 2007 2:36 am    Post subject: AVIStreamRead failes : AVIERR_ERROR Reply with quote



The follwoing code crashes at the first call to AVIStreamRead with the
not-really-explicit AVIERR_ERROR code.

Does anyone can help ?

nTot := AVIStreamLength(inAudStream);
nStart := AVIStreamStart(inAudStream);

nStep := nTot div 20;
for I := 0 to 20 do
begin
if I = 20 then nStep := nTot - 20*nStep;
hr :=
AVIStreamRead(inAudStream,nStart+I*nStep,nStep,nil,0,@nBufLen,nil);
Assert(hr = 0, 'StreamRead failed. Err: $' + IntToHex(hr, Cool);
SetLength(pBuffer,nBufLen);

hr :=
AVIStreamRead(inAudStream,nStart+I*nStep,nStep,pBuffer,nBufLen,nil,nil);
Assert(hr = 0, 'StreamRead failed. Err: $' + IntToHex(hr, Cool);

mp3.Write(pBuffer[0],nBufLen);
ProgFct(I*5);
end;
Back to top
Kyle Katarn
Guest





PostPosted: Wed Mar 28, 2007 10:49 pm    Post subject: Re: AVIStreamRead failes : AVIERR_ERROR Reply with quote



Help me please ;-)

"Kyle Katarn" <kyle.katarn (AT) kcsoftwares (DOT) com> a écrit dans le message de news:
45ef223d$0$27461$426a74cc (AT) news (DOT) free.fr...
Quote:
The follwoing code crashes at the first call to AVIStreamRead with the
not-really-explicit AVIERR_ERROR code.

Does anyone can help ?

nTot := AVIStreamLength(inAudStream);
nStart := AVIStreamStart(inAudStream);

nStep := nTot div 20;
for I := 0 to 20 do
begin
if I = 20 then nStep := nTot - 20*nStep;
hr :=
AVIStreamRead(inAudStream,nStart+I*nStep,nStep,nil,0,@nBufLen,nil);
Assert(hr = 0, 'StreamRead failed. Err: $' + IntToHex(hr, Cool);
SetLength(pBuffer,nBufLen);

hr :=
AVIStreamRead(inAudStream,nStart+I*nStep,nStep,pBuffer,nBufLen,nil,nil);
Assert(hr = 0, 'StreamRead failed. Err: $' + IntToHex(hr, Cool);

mp3.Write(pBuffer[0],nBufLen);
ProgFct(I*5);
end;
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.