~ubuntu-branches/ubuntu/saucy/sflphone/saucy

« back to all changes in this revision

Viewing changes to sflphone-common/src/audio/dcblocker.h

  • Committer: Bazaar Package Importer
  • Author(s): Francois Marier
  • Date: 2010-12-24 16:33:55 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20101224163355-tkvvikqxbrbav6up
Tags: 0.9.11-1
* New upstream release
* Add new build dependencies on libwebkit-dev and libyaml-dev

* Bump Standards-Version up to 3.9.1
* Bump debhelper compatibility to 8
* Patch another typo in the upstream code (lintian notice)

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
#ifndef DCBLOCKER_H
32
32
#define DCBLOCKER_H
33
33
 
 
34
#include "algorithm.h"
34
35
#include "global.h"
35
36
 
36
 
class DcBlocker {
37
 
 
38
 
public:
39
 
 
40
 
    DcBlocker();
41
 
 
42
 
    ~DcBlocker();
43
 
 
44
 
    void filter_signal(SFLDataFormat* audio_data, int length);
45
 
 
46
 
private:
47
 
 
48
 
    SFLDataFormat y, x, xm1, ym1;
 
37
#include <vector>
 
38
 
 
39
class DcBlocker : public Algorithm
 
40
{
 
41
 
 
42
    public:
 
43
 
 
44
        DcBlocker();
 
45
 
 
46
        ~DcBlocker();
 
47
 
 
48
        virtual void reset (void);
 
49
 
 
50
        /**
 
51
         * Unused
 
52
         */
 
53
        virtual void putData (SFLDataFormat *inputData, int nbBytes);
 
54
 
 
55
        /**
 
56
         * Unused
 
57
         */
 
58
        virtual int getData (SFLDataFormat *outputData);
 
59
 
 
60
        /**
 
61
         * Perform dc blocking given the input data
 
62
         */
 
63
        virtual void process (SFLDataFormat *data, int nbBytes);
 
64
 
 
65
        /**
 
66
         * Perform echo cancellation using internal buffers
 
67
         * \param inputData containing mixed echo and voice data
 
68
         * \param outputData containing
 
69
         */
 
70
        virtual int process (SFLDataFormat *inputData, SFLDataFormat *outputData, int nbBytes);
 
71
 
 
72
        /**
 
73
         * Perform echo cancellation, application must provide its own buffer
 
74
         * \param micData containing mixed echo and voice data
 
75
         * \param spkrData containing far-end voice data to be sent to speakers
 
76
         * \param outputData containing the processed data
 
77
         */
 
78
        virtual void process (SFLDataFormat *micData, SFLDataFormat *spkrData, SFLDataFormat *outputData, int nbBytes);
 
79
 
 
80
    private:
 
81
 
 
82
        SFLDataFormat _y, _x, _xm1, _ym1;
49
83
};
50
84
 
51
85
#endif