~ubuntu-branches/ubuntu/wily/sflphone/wily

« back to all changes in this revision

Viewing changes to daemon/src/audio/dcblocker.h

  • Committer: Package Import Robot
  • Author(s): Mark Purcell
  • Date: 2014-01-28 18:23:36 UTC
  • mfrom: (1.1.11)
  • mto: This revision was merged to the branch mainline in revision 24.
  • Revision ID: package-import@ubuntu.com-20140128182336-3xenud1kbnwmf3mz
* New upstream release 
  - Fixes "New Upstream Release" (Closes: #735846)
  - Fixes "Ringtone does not stop" (Closes: #727164)
  - Fixes "[sflphone-kde] crash on startup" (Closes: #718178)
  - Fixes "sflphone GUI crashes when call is hung up" (Closes: #736583)
* Build-Depends: ensure GnuTLS 2.6
  - libucommon-dev (>= 6.0.7-1.1), libccrtp-dev (>= 2.0.6-3)
  - Fixes "FTBFS Build-Depends libgnutls{26,28}-dev" (Closes: #722040)
* Fix "boost 1.49 is going away" unversioned Build-Depends: (Closes: #736746)
* Add Build-Depends: libsndfile-dev, nepomuk-core-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 *  Copyright (C) 2004-2012 Savoir-Faire Linux Inc.
 
2
 *  Copyright (C) 2004-2013 Savoir-Faire Linux Inc.
3
3
 *  Author: Alexandre Savard <alexandre.savard@savoirfairelinux.com>
 
4
 *  Author: Adrien Beraud <adrien.beraud@gmail.com>
4
5
 *
5
6
 *  This program is free software; you can redistribute it and/or modify
6
7
 *  it under the terms of the GNU General Public License as published by
32
33
#define DCBLOCKER_H
33
34
 
34
35
#include "sfl_types.h"
 
36
#include "audiobuffer.h"
35
37
 
36
38
class DcBlocker {
37
39
    public:
38
 
        DcBlocker();
 
40
        DcBlocker(unsigned channels = 1);
39
41
        void reset();
40
 
        void process(SFLDataFormat *out, SFLDataFormat *in, int samples);
 
42
 
 
43
        void process(SFLAudioSample *out, SFLAudioSample *in, int samples);
 
44
 
 
45
        /**
 
46
         * In-place processing of all samples in buf (each channel treated independently)
 
47
         */
 
48
        void process(AudioBuffer& buf);
41
49
 
42
50
    private:
43
 
 
44
 
        SFLDataFormat y_, x_, xm1_, ym1_;
 
51
        struct StreamState {
 
52
            SFLAudioSample y_, x_, xm1_, ym1_;
 
53
        };
 
54
 
 
55
        void doProcess(SFLAudioSample *out, SFLAudioSample *in, unsigned samples, struct StreamState * state);
 
56
 
 
57
        std::vector<StreamState> states;
45
58
};
46
59
 
47
60
#endif