[speex-dev] question on usage of the libraries

Folkert van Heusden folkert at vanheusden.com
Fri Dec 13 11:46:35 PST 2002



> Is the following code correct for compressing audio? The output I get is
so
> extremely small, but what is more important: if I pass it through zlib, it
> gets at least 50% smaller!
JM> On regular data, gzip might get a 5% reduction, so I doubt you can get
JM> 50% unless you're encoding zeros or doing something wrong...

I think I'm doing something wrong :o) Don't know what though.
Also, I could not find in the documentation how to convert the sample-data
to floats. Now I'm just doing something like

float_data[index] = (float)input_data[index];

where input_data is a short *input_data "array". Is this correct? Or should
I scale the data down to -1.0 <= x <= 1.0?

JM> In normal operation, narrowband is 8000 Hz, wideband is 16000 Hz and
JM> ultra-wideband is 32000 Hz, so I'd change the 22050 for something like
JM> 12000 (and maybe have above 22050 encoded in ultra-wideband if
JM> necessary).

Ah, ok, thanks.

--- >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 'speex-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 Speex-dev mailing list