File: comb.cpp

package info (click to toggle)
vlc 3.0.23-2
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 208,024 kB
  • sloc: ansic: 443,448; cpp: 111,223; objc: 36,399; sh: 6,737; makefile: 6,627; javascript: 4,902; xml: 1,611; asm: 1,355; yacc: 644; python: 321; lex: 88; perl: 77; sed: 16
file content (50 lines) | stat: -rw-r--r-- 654 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// Comb filter implementation
//
// Written by Jezar at Dreampoint, June 2000
// http://www.dreampoint.co.uk
// This code is public domain

#include "comb.hpp"
#include <stddef.h>

comb::comb()
{
    filterstore = 0;
    bufidx = 0;
    buffer = NULL;
}

void comb::setbuffer(float *buf, int size)
{
    buffer = buf;
    bufsize = size;
}

void comb::mute()
{
    for (int i=0; i<bufsize; i++)
        buffer[i]=0;
}

void comb::setdamp(float val)
{
    damp1 = val;
    damp2 = 1-val;
}

float comb::getdamp()
{
    return damp1;
}

void comb::setfeedback(float val)
{
    feedback = val;
}

float comb::getfeedback()
{
    return feedback;
}

// ends