audioconvert: change multiplier for int<->float conversion
authorWim Taymans <wtaymans@redhat.com>
Tue, 3 Nov 2015 10:44:54 +0000 (11:44 +0100)
committerWim Taymans <wtaymans@redhat.com>
Tue, 3 Nov 2015 11:12:08 +0000 (12:12 +0100)
commit9e15c895644c0c15513fec0623416286700da184
tree52c1077fe656fea7119e5d31c3bf2ec42292f4e8
parentfe62e797d501d0637889d8df15617ce63f81099b
audioconvert: change multiplier for int<->float conversion

Use (1 << 31) as the multiplier for int<->float conversions. This makes
sure that int->float conversions always end up with floats between
[-1.0, 1.0].
For the conversion from float to int, this multiplier will give the complete
int range after we perform clipping.
Change the unit test to take this into consideration.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=755301
gst/audioconvert/gstaudioconvertorc.orc
tests/check/elements/audioconvert.c