[Vorbis-dev] Speed up?
2spork at informatik.uni-hamburg.de
2spork at informatik.uni-hamburg.de
Thu May 11 08:06:39 PDT 2006
Hello,
hope you're fine.
And hopefully someone can help me.
I wrote a short demonstration to show you my problem (see below). I'm
asking always for 64 samples. When "ov_read_float()" is finished, I
want to seek back to sample 1, and ask immediately for the next 64
samples.
But when I run this small app, I get an totally high CPU load.
Is there a way to it speed up?
Or do I miss something?
Thanx,
Micha.
int _tmain(int argc, _TCHAR* argv[]){
OggVorbis_File vf;
errno_t err;
if ( (err = fopen_s( &oggaudio, "C:\\Test\\3.ogg" , "rb")) != 0){
std::cout << "fopen problem" << std::endl;
}
if ( ov_open( oggaudio, &vf, NULL, 0 ) < 0 ){
std::cout << "ov_open problem" << std::endl;
}
int read = 0;
float** ovdata;
int current_section = 0;
do{
read = ov_read_float(&vf , &ovdata, 64, ¤t_section);
if ( read == 0 ){
ov_pcm_seek( &vf, 0 ); // ov_raw_seek() won't help
read = ov_read_float(&vf, &ovdata, 64, ¤t_section);
}
} while (read != 0);
return 0;
}
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
More information about the Vorbis-dev
mailing list