[vorbis-dev] encoding from 22050Hz source
dholth at fastmail.fm
Tue Apr 20 19:29:44 PDT 2004
-----BEGIN PGP SIGNED MESSAGE-----
Michael Smith wrote:
| On Tuesday 20 April 2004 23:12, Crock Real wrote:
|> 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...
I have this frustrating problem with gentoo + python's numarray + my
oggpy wrapper: vorbis encoding and decoding generates floating point
exceptions. Only on gentoo, and maybe only on my compile of gentoo.
Others have had the same problem with completely different libraries.
Possibly some compiler flag was set, somewhere, in one of the
libraries used, that results in this snafPu. Recompiling everything
has been known to help. Unfortunately I haven't solved my problems
with this yet.
I assume you don't want your program to die when it divides by zero,
rather just live with the NaN and -inf and +inf. Solutions may include
handling SIGFPE or disabling the exception.
~From the GNU libc info pages:
~ "When exceptions occur (when exceptions are "raised", in the
~ of the standard), one of two things can happen. By default the
~ exception is simply noted in the floating-point "status word",
~ program continues as if nothing had happened. The operation
~ produces a
~ default value, which depends on the exception (see the table below).
~ Your program can check the status word to find out which exceptions
~ "Alternatively, you can enable "traps" for exceptions. In that
~ when an exception is raised, your program will receive the `SIGFPE'
~ signal. The default action for this signal is to terminate the
~ program. *Note Signal Handling::, for how you can change the
~ effect of
~ the signal."
There are some new C99 functions that help the programmer control and
examine FPU exceptions. This glibc documentation page might be a good
If you figure this out, please share!
- - Daniel Holth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
--- >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