diff options
Diffstat (limited to 'common/sinetables.h')
-rw-r--r-- | common/sinetables.h | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/common/sinetables.h b/common/sinetables.h index 28918838f4..16e203f26d 100644 --- a/common/sinetables.h +++ b/common/sinetables.h @@ -25,12 +25,30 @@ namespace Common { -/** - * Get a sine table with the specified bit precision - * - * @param bits Precision of the table, which must be in range [4, 16] - */ -const float *getSineTable(int bits); +class SineTable { +public: + /** + * Construct a sine table with the specified bit precision + * + * @param bitPrecision Precision of the table, which must be in range [4, 16] + */ + SineTable(int bitPrecision); + ~SineTable(); + + /** + * Get pointer to table + */ + const float *getTable() { return _table; } + + /** + * Get pointer to table + */ + int getPrecision() { return _bitPrecision; } + +private: + float *_table; + int _bitPrecision; +}; } // End of namespace Common |