[vorbis-dev] Problem with seek functions,
Matthijs
creepingdeathnl at metallica.com
Wed Feb 14 06:14:18 PST 2001
On Mon, 12 February 2001, OmegaDan wrote:
[snip code]
Hmm, weird.. that does work for me. I only had the trouble that ov_time_tell returned negative infinity
after a ov_time_seek to 0 secs. This is my code:
function TMainForm.ReadBuf(Buffer: PChar; Size: Longword; var Time: Single): Longword;
var BytesRead, Change: Longword;
begin
BytesRead := 0;
Time := ov_time_tell(vf^);
if Time < 0 then // check against NAN, -INF
Time := 0;
repeat
Change := ov_read(vf^, @Buffer[BytesRead], Size - BytesRead, 0, 2, 1, StreamNumber);
BytesRead := BytesRead + Change;
until (Change = 0) or (BytesRead = Size);
Result := BytesRead;
end;
Windows 98/MSVC++6-Dynamic/Borland Delphi 5.
Matthijs
Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.
Albert Einstein (1879 - 1955)
______________________________________________________________________
Get your Private, Free E-mail from Metallica at http://mail.metallica.com powered by XingMail. Check out Metallica's Official Web Site at http://www.metallica.com
--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the Vorbis-dev
mailing list