Skip to main content
gamedev.net
🔒 Locked

Ogg Vorbis problem !

Started by LorenSoth Apr 15, 2005 at 8:32 AM 5 replies 1.4k views
Original Post
LorenSoth
LorenSoth
i hope here is the right forum that im attaching this one. ov_read function should return number of bytes that it reads, but it returns 0 for the first time and it means end of file ! here is how i implement char mychar[BUFFER_SIZE ] ; int mysection ; ov_read(&oggStream, mychar , BUFFER_SIZE , 0, 2, 1, &mysection); i also checked that oggStream variable from OggVorbis_File structure is filled correctly ( i looked the channels and frequency etc... )
Rhaal
Rhaal
I'm not too sure you'll find many people using that library around here. I'd do some general checks like verifying BUFFER_SIZE isn't 0. I'm not familiar with Ogg Vorbis. You may want to look into FMOD if you're not too far into development.
- A momentary maniac with casual delusions.
LorenSoth
LorenSoth
hmm i see , no buffer size is 4096.. anyway thanks.
Evil Steve
Evil Steve
Have you tried using ov_raw_seek to seek to the start of the file? If you've already read through the file, you'll need to reset the file pointer.
LorenSoth
LorenSoth
no im reading the file first time i think it shouldnt be the case, but i will try what you say...thanks..
LorenSoth
LorenSoth
alright i called the function

ov_raw_seek(&oggStream,0);

before ov_read still ov_read returns 0
Any other ideas ???
LorenSoth
LorenSoth
damn it ! i ve found the problem i just closed the file stream by fclose after ov_open ! it should be opened for all processing .. thanks for replies anyway

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.