Click here to Skip to main content
16,004,653 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: To Michael Dunn Pin
Guoguor23-Sep-04 16:09
Guoguor23-Sep-04 16:09 
GeneralRe: To Michael Dunn Pin
Bob Stanneveld24-Sep-04 0:08
Bob Stanneveld24-Sep-04 0:08 
GeneralRe: To Michael Dunn Pin
Antony M Kancidrowski24-Sep-04 3:38
Antony M Kancidrowski24-Sep-04 3:38 
QuestionWhere and when to initialize them? Pin
Guoguor23-Sep-04 15:09
Guoguor23-Sep-04 15:09 
AnswerRe: Where and when to initialize them? Pin
Michael Dunn23-Sep-04 15:15
sitebuilderMichael Dunn23-Sep-04 15:15 
GeneralHelp writing a function Pin
NietzscheDisciple23-Sep-04 12:11
NietzscheDisciple23-Sep-04 12:11 
GeneralRe: Help writing a function Pin
Ravi Bhavnani23-Sep-04 12:35
professionalRavi Bhavnani23-Sep-04 12:35 
GeneralRe: Help writing a function Pin
NietzscheDisciple23-Sep-04 12:44
NietzscheDisciple23-Sep-04 12:44 
Thanks, Ravi.

To answer your questions, this function which I'll call SmoothingFunction, is called by another function by name, SmoothCoeffs().

I have two arrays, Coeff[] and Smooth[], each with 5 elements. Values in the array Coeff[] are "smoothed" and then stored in Smooth[].

Here is the SmoothCoeffs() function:
NUM_ITER is 5.

<br />
inline void cDSP::SmoothCoeffs()<br />
{<br />
   float *nStart = &gnCoeff[mnCoeffIndex];<br />
   float *nFin = &gnSmooth[mnCoeffIndex];<br />
<br />
   for (int i = 0; i < NUM_ITER; i++)<br />
   {<br />
	// CALL SMOOTHING ROUTINE<br />
	SmoothingFunction(nStart, nFin, mnSmoothCoeff);<br />
    }<br />
<br />
    mnCoeffIndex += NUM_ITER;				   // increment coeff index<br />
	<br />
   if (mnCoeffIndex >= NUM_COEFF)<br />
	mnCoeffIndex = 0;				   // reset coeff index if finished with buffer<br />
}<br />


"x" represents an element of Coeff() and "y" represents an element of Smooth().

Hope that helps!
GeneralRe: Help writing a function Pin
Ravi Bhavnani23-Sep-04 13:31
professionalRavi Bhavnani23-Sep-04 13:31 
GeneralRe: Help writing a function Pin
NietzscheDisciple23-Sep-04 13:45
NietzscheDisciple23-Sep-04 13:45 
GeneralRe: Help writing a function Pin
Ravi Bhavnani23-Sep-04 18:07
professionalRavi Bhavnani23-Sep-04 18:07 
GeneralRecursive File Enumeration Pin
wayvirgo23-Sep-04 11:50
wayvirgo23-Sep-04 11:50 
GeneralRe: Recursive File Enumeration Pin
David Salter23-Sep-04 11:56
David Salter23-Sep-04 11:56 
GeneralRe: Recursive File Enumeration Pin
wayvirgo23-Sep-04 12:08
wayvirgo23-Sep-04 12:08 
GeneralRe: Recursive File Enumeration Pin
BlackDice24-Sep-04 3:20
BlackDice24-Sep-04 3:20 
QuestionHow about this? Pin
Tom Wright23-Sep-04 11:34
Tom Wright23-Sep-04 11:34 
AnswerRe: How about this? Pin
Michael Dunn23-Sep-04 11:42
sitebuilderMichael Dunn23-Sep-04 11:42 
GeneralRe: How about this? Pin
Tom Wright23-Sep-04 11:50
Tom Wright23-Sep-04 11:50 
GeneralRe: How about this? Pin
BlackDice23-Sep-04 11:59
BlackDice23-Sep-04 11:59 
GeneralRe: How about this? Pin
Tom Wright23-Sep-04 12:04
Tom Wright23-Sep-04 12:04 
GeneralRe: How about this? Pin
Michael Dunn23-Sep-04 12:03
sitebuilderMichael Dunn23-Sep-04 12:03 
GeneralRe: How about this? Pin
Tom Wright23-Sep-04 12:24
Tom Wright23-Sep-04 12:24 
GeneralRe: How about this? Pin
Tom Wright23-Sep-04 12:32
Tom Wright23-Sep-04 12:32 
GeneralRe: How about this? Pin
Michael Dunn23-Sep-04 15:13
sitebuilderMichael Dunn23-Sep-04 15:13 
GeneralRe: How about this? Pin
markkuk23-Sep-04 23:58
markkuk23-Sep-04 23:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.