0

Hi, I have two problems, been bugging me for a couple of days...

I have a 32bit float array that has been calculated, I now need to convert it to 16bit int values to be scaled for use.

I tried the code: h[N] = int (h[N]*(scale[N]) and that sort of works, it give MAX values to the whole array, but I need to reduce the bit count down to 16 bits.. (its in a for loop N =0; etc already)

Also I am supposed to be using a ceil function (rounding a float value up to the next int value) but it dosn't seen to work either. My example code uses it. The hlpe files referenced the fucntion ceilf as an external function, but its only returning a 0 instead of the desired value..

extern float ceilf(); 	//sets ceil function
n = ceilf(Nf);   //should return 83, returns 0.

My target application is a TI DSP board...

Bit of background about me.. I'm an audio engineering student, been stiched up by my institution and am being forced to try and get my head round DSP C design in little or no time :/ ANY help is wildly appreciated!

Thanks for looking

2
Contributors
2
Replies
3
Views
12 Years
Discussion Span
Last Post by yacob_uk
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.