Vinod Vijayan
2005-Jan-04 03:52 UTC
[Speex-dev] Conversion problem in encoding and decoding
Hi, I am new to this newsgroup. I have a problem using the Speex library. I have recorded sound data using a character buffer like char recMessg[BUFFERSIZE]. I have problem converting this to the float array for encoding. Also help me in converting the decoded information in float array back to character array. Can anybody give me function codes for this conversion. Thanks in advance.
--- Vinod Vijayan <vinod@speechdesk.com> wrote:> Hi, > I am new to this newsgroup. I have a problem using > the Speex library. > I have recorded sound data using a character > buffer like > char recMessg[BUFFERSIZE]. I have problem > converting this to the > float array for encoding.short temp_short; float temp_float; float floatData[number_of_sample]; for (int i=0; i < number_of_sample; i++) { memcpy(&temp_short, &src[i*2], 2); temp_float = temp_short; floatData[i] = temp_float; } yueweng __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo