diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-11-04 19:40:33 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-11-04 19:40:33 +0000 |
| commit | c2dc03da9cc94fd9bd7e530363b113564237f00e (patch) | |
| tree | 4c027ab8aa49214014af378f94082e0c6721d3bb /src/lib/delay_line.h | |
| parent | c366d41af080b9ac37117a9b27a249722c77f74e (diff) | |
Do the delay line in floats with an AudioBuffer.
Diffstat (limited to 'src/lib/delay_line.h')
| -rw-r--r-- | src/lib/delay_line.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/lib/delay_line.h b/src/lib/delay_line.h index 377553de4..e8d9560af 100644 --- a/src/lib/delay_line.h +++ b/src/lib/delay_line.h @@ -17,20 +17,20 @@ */ -/** A class which can be fed a stream of bytes and which can - * delay them by a positive or negative amount. - */ +#include <boost/shared_ptr.hpp> + +class AudioBuffers; + +/** A delay line for audio */ class DelayLine { public: - DelayLine (int); + DelayLine (int channels, int frames); ~DelayLine (); - int feed (uint8_t *, int); - void get_remaining (uint8_t *); + void feed (boost::shared_ptr<AudioBuffers>); private: - int _delay; ///< delay in bytes, +ve to move data later - uint8_t* _buffer; ///< buffer for +ve delays, or 0 - int _negative_delay_remaining; ///< number of bytes of negative delay that remain to emit + boost::shared_ptr<AudioBuffers> _buffers; + int _negative_delay_remaining; ///< number of frames of negative delay that remain to emit }; |
