1 ////////////////////////////////////////////////////////////////////////////
2 // **** WAVPACK **** //
3 // Hybrid Lossless Wavefile Compressor //
4 // Copyright (c) 1998 - 2004 Conifer Software. //
5 // All Rights Reserved. //
6 // Distributed under the BSD Software License (see license.txt) //
7 ////////////////////////////////////////////////////////////////////////////
13 int read_float_info (WavpackStream
*wps
, WavpackMetadata
*wpmd
)
15 int bytecnt
= wpmd
->byte_length
;
16 char *byteptr
= wpmd
->data
;
21 wps
->float_flags
= *byteptr
++;
22 wps
->float_shift
= *byteptr
++;
23 wps
->float_max_exp
= *byteptr
++;
24 wps
->float_norm_exp
= *byteptr
;
28 /* This function converts WavPack floating point data into standard Rockbox
29 * 28-bit integers. It is assumed that clipping will be taken care of later.
32 void float_values (WavpackStream
*wps
, int32_t *values
, int32_t num_values
)
34 int shift
= wps
->float_max_exp
- wps
->float_norm_exp
+ wps
->float_shift
+ 5;