Skip to main content


Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: why only 80 samples? (Read 3570 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

why only 80 samples?

When I encode a 160 samples frame by Speex, I get 38 bytes (char) as a result. 

When I try to decode those 38 bytes back,  I expect 160 samples again and allocate the buffer for that. But after decompression only half of the buffer is filled with data (80 samples), the rest is filled with unknown values.  Why is that happening?  How am I supposed to decompress the frame correctly?


why only 80 samples?

Reply #1
I would surmise that this is due to Speex resampling the data to 22kHz.  However that answer seems a little too easy.
gentoo ~amd64 + layman | ncmpcpp/mpd | wavpack + vorbis + lame

why only 80 samples?

Reply #2
resampling?  How's that possible?

I explicitile ask Speex to work in narrow_band mode (8000 Hz) because my signal is sampled with 8000 Hz rate 


why only 80 samples?

Reply #3
I take a PCM file, signed, 16 bit per sample.  Let's say the size of the file is 70K.  Encode with Speex (narrow band), decode back and get a file which size is twice bigger than original    Why is that happening?  I expected the size would be the same.

I don't get it... Speex says "I need 16 bits per sample, signed, PCM signal".  I create such file in audio editor.  After encoding, decoding the result is twice bigger, first. And second, the signal is absolutely distorted.

SimplePortal 1.0.0 RC1 © 2008-2021