 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Kyle Katarn Guest
|
Posted: Thu Mar 08, 2007 2:36 am Post subject: AVIStreamRead failes : AVIERR_ERROR |
|
|
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, );
SetLength(pBuffer,nBufLen);
hr :=
AVIStreamRead(inAudStream,nStart+I*nStep,nStep,pBuffer,nBufLen,nil,nil);
Assert(hr = 0, 'StreamRead failed. Err: $' + IntToHex(hr, );
mp3.Write(pBuffer[0],nBufLen);
ProgFct(I*5);
end; |
|
| Back to top |
|
 |
Kyle Katarn Guest
|
Posted: Wed Mar 28, 2007 10:49 pm Post subject: Re: AVIStreamRead failes : AVIERR_ERROR |
|
|
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, );
SetLength(pBuffer,nBufLen);
hr :=
AVIStreamRead(inAudStream,nStart+I*nStep,nStep,pBuffer,nBufLen,nil,nil);
Assert(hr = 0, 'StreamRead failed. Err: $' + IntToHex(hr, );
mp3.Write(pBuffer[0],nBufLen);
ProgFct(I*5);
end;
|
|
|
| Back to top |
|
 |
|
|
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
|
|