[Vorbis-dev] ov_read_float vs. ov_read
2spork at informatik.uni-hamburg.de
2spork at informatik.uni-hamburg.de
Sun Oct 9 03:42:59 PDT 2005
Hello,
Am I missing something?
float** pcm_channels;
int bitstream;
int where = ov_pcm_tell(&vf);
-> The Result is "0";
ov_read_float(&vf, &pcm_channels, 1, &bitstream);
-> pcm_channels[0][0] is "0.000338580"
ov_pcm_seek(&vf, 0);
char* buffer = new char[2];
ov_read(&vf, buffer, sizeof(buffer), 0, 2, 1, &bitstream);
short temp = *((short*)buffer);
float test = temp / 32768.0f;
-> test is "0.000335693"
Why are the values different?
Am I doing a wrong calculation?
Or is "ov_read_float()" doing an other calculation?
Thanx,
Micha.
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
More information about the Vorbis-dev
mailing list