CSL 5.2

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

DLine.h
Go to the documentation of this file.
1 //
2 // DLine.h -- an Interpolating Delay Line
3 // See the copyright notice and acknowledgment of authors in the file COPYRIGHT
4 //
5 // This is a typical circular buffer with one writer and multiple readers (tap instances)
6
7 #ifndef INCLUDE_DLine_H
8 #define INCLUDE_DLine_H
9
10 #include "CSL_Core.h"
11
12 namespace csl {
13
14 typedef enum {
15 kTruncate,
16 kLinear,
17 kAllPass
18 } InterpType;
19
20 class DLine : public FrameStream, public Processor {
21
22 private:
23 Buffer ring_buffer;
24
25 float max_delay_time;
26 float delay_time;
27 float target_delay_time;
28 unsigned max_delay_in_frames;
29 InterpType interp_type;
30 unsigned start_frame;
31 // unsigned end_frame;
32 unsigned write_frame;
33
34 public:
35 DLine( FrameStream &input, float max_delay );
36 ~DLine();
37
38 bool set_target_delay_time( float tdt );
39 bool init_delay_time( float dt );
40 bool set_interp_type( InterpType );
41 // update_write_frame( unsigned how_many_frames);
42
43 status mono_next_buffer(Buffer & inputBuffer, Buffer & outputBuffer, unsigned inBufNum, unsigned outBufNum);
44 status next_buffer(Buffer & inputBuffer, Buffer & outputBuffer);
45
46 };
47
48 }
49
50 #endif