Hi!
I'd like to encode from a 22050 Hz source wav file (only in that case),
but i get the following error message: "Invalid floating point
operation"
I use delphi:
vorbis_encode_init_vbr(vi,2,22050,0.5)
.
.
.
While (i < readCount div 4) Do
Begin
buffer[0][i] := smallInt((pArray(@readbuffer)[i shl 2 + 1] shl 8) or
pArray(@readbuffer)[i shl 2 + 0]) / 32768;
buffer[1][i] := smallInt((pArray(@readbuffer)[i shl 2 + 3] shl 8) or
pArray(@readbuffer)[i shl 2 + 2]) / 32768;
inc(i);
End
What could be wrong???
Thank you!
crc
---------------------------------
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢
--- >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@xiph.org'
containing only the word 'unsubscribe' in the body. No subject is
needed.
Unsubscribe messages sent to the list will be ignored/filtered.
On Tuesday 20 April 2004 03:32, Crock Real wrote:> Hi! > > I'd like to encode from a 22050 Hz source wav file (only in that case), > but i get the following error message: "Invalid floating point operation" > > I use delphi:There could be some bug - particularly if you're using an older version of the libraries, but possibly in the current version - that is causing floating point exceptions. Usually, on x86 systems, these are turned off by default - perhaps delphi apps turn them on. You'll have to look at this in a debugger and tell us where it's happening, because it doesn't occur for most users. Mike --- >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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
>----- Original Message ----- >From: Crock Real >To: vorbis-dev@xiph.org >Sent: Tuesday, April 20, 2004 1:32 AM >Subject: [vorbis-dev] encoding from 22050Hz source > > >Hi! > >I'd like to encode from a 22050 Hz source wav file (only in that case), >but i get the following error message: "Invalid floating point operation" > >I use delphi: > >vorbis_encode_init_vbr(vi,2,22050,0.5) >. >. >. >While (i < readCount div 4) Do > Begin > buffer[0][i] := smallInt((pArray(@readbuffer)[i shl 2 + 1] shl 8)or pArray(@readbuffer)[i shl 2 + 0]) / 32768;> buffer[1][i] := smallInt((pArray(@readbuffer)[i shl 2 + 3] shl 8)or pArray(@readbuffer)[i shl 2 + 2]) / 32768;> inc(i); >End > >What could be wrong???My guess is that your floating point exception is a division by zero... though from memory pascal at least doesn't allow integers to wrap around, but i don't know about delphi. But without seeing your types for your variables it's a bit hard to know what's what... but if small int is a 16 bit signed integer and delphi wraps integers then 32768 is out of range (-32768 <= 16bitint <= 32767) I'm guessing 32768 becomes 0 and it's a division by zero. It should really be 32767. Though that presents the problem that -32768/32767 will give you a float < -1.0... you should just clip this to -1.0, that's the easiest way. Zen. <p><p>>>Thank you! > >crc<p><p><p>--- >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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
Hi!
I use libraries from the win32sdk-1.0.1. Is it ok?
My program halts at line:
while(vorbis_analysis_blockout(vd,vb)=1) do
Begin
-> vorbis_analysis(vb,op); //"Invalid floating point
operation"
//but not at once, only in the third loop...
And just then, when the source is 22050Hz...
:-(
?
Tank you!
---------------------------------
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢
--- >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@xiph.org'
containing only the word 'unsubscribe' in the body. No subject is
needed.
Unsubscribe messages sent to the list will be ignored/filtered.