cwAudioTransforms.h : Added comments.

This commit is contained in:
kevin 2024-12-14 09:58:54 -05:00
parent 6b9ac3a54e
commit 375ed8bed4

View File

@ -1023,7 +1023,9 @@ namespace cw
//--------------------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------------------
// Data Recorder // Data Recorder
// //
// Record frames of data and write them to a CSV file.
// A frame consists of 'sigN' values of type T.
//
namespace data_recorder namespace data_recorder
{ {
@ -1043,9 +1045,9 @@ namespace cw
struct block_str<T>* tail; // last block and the one being currrently filled struct block_str<T>* tail; // last block and the one being currrently filled
unsigned frameIdx; // index into tail of frame to fill unsigned frameIdx; // index into tail of frame to fill
char* fn; char* fn; // output CSV filename
char** colLabelA; char** colLabelA; // output CSV column labels
unsigned colLabelN; unsigned colLabelN; // count of CSV column labels
bool enableFl; bool enableFl;
}; };
@ -1071,7 +1073,13 @@ namespace cw
} }
template< typename T > template< typename T >
rc_t create( struct obj_str<T>*& p, unsigned sigN, unsigned frameCacheN, const char* fn, const char** colLabelA, unsigned colLabelN, bool enableFl ) rc_t create( struct obj_str<T>*& p,
unsigned sigN,
unsigned frameCacheN,
const char* fn,
const char** colLabelA,
unsigned colLabelN,
bool enableFl )
{ {
rc_t rc = kOkRC; rc_t rc = kOkRC;
@ -1152,6 +1160,11 @@ namespace cw
return kOkRC; return kOkRC;
} }
// Pass a partial (or full) frame of data to the object.
// xV[xN] is the data to record.
// chIdx is the first channel to write to.
// (xN + chIdx must be less than p->sigN)
// Set advance_fl to true to advance to the next frame.
template< typename T> template< typename T>
rc_t exec( struct obj_str<T>* p, const T* xV, unsigned xN, unsigned chIdx=0, bool advance_fl = true ) rc_t exec( struct obj_str<T>* p, const T* xV, unsigned xN, unsigned chIdx=0, bool advance_fl = true )
{ {