Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: Sine_f32.h
- Revision:
- 0:7e3eedc2a9fa
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Sine_f32.h Mon Mar 12 11:36:51 2012 +0000
@@ -0,0 +1,24 @@
+/* Copyright (c) 2012 mbed.org */
+#ifndef SINE_F32_H
+#define SINE_F32_H
+
+#include <stdint.h>
+#include "arm_math.h"
+
+
+class Sine_f32 {
+public:
+ Sine_f32(uint32_t frequency, uint32_t sample_rate=48000, float32_t amplitude=1.f, float32_t phase=0.0, uint32_t block_size=32);
+
+ void process(float32_t *signal);
+
+ void reset(void);
+
+private:
+ float32_t _dx;
+ float32_t _amplitude;
+ float32_t _x;
+ uint32_t _block_size;
+};
+
+#endif