Commit c9f1e9c7 authored by Rafaël Carré's avatar Rafaël Carré

Remove unused AudioProcessing class

parent 4f86fc54
......@@ -18,7 +18,6 @@ libaudio_la_SOURCES = \
echosuppress.cpp \
speexechocancel.cpp \
noisesuppress.cpp \
audioprocessing.cpp \
gaincontrol.cpp \
dcblocker.cpp \
$(SPEEX_SOURCES_CPP)
......@@ -38,7 +37,6 @@ noinst_HEADERS = \
echosuppress.h \
speexechocancel.h \
noisesuppress.h \
audioprocessing.h \
gaincontrol.h \
dcblocker.h \
samplerateconverter.h
......
......@@ -31,7 +31,6 @@
#include "alsalayer.h"
#include "audio/dcblocker.h"
#include "audio/audioprocessing.h"
#include "eventthread.h"
#include "audio/samplerateconverter.h"
#include "managerimpl.h"
......
......@@ -31,7 +31,6 @@
#include <ctime>
#include "audiolayer.h"
#include "audioprocessing.h"
#include "audio/dcblocker.h"
#include "manager.h"
......
/*
* Copyright (C) 2004, 2005, 2006, 2008, 2009, 2010, 2011 Savoir-Faire Linux Inc.
* Author: Alexandre Savard <alexandre.savard@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* Additional permission under GNU GPL version 3 section 7:
*
* If you modify this program, or any covered work, by linking or
* combining it with the OpenSSL project's OpenSSL library (or a
* modified version of that library), containing parts covered by the
* terms of the OpenSSL or SSLeay licenses, Savoir-Faire Linux Inc.
* grants you additional permission to convey the resulting work.
* Corresponding Source for a non-source form of such a combination
* shall include the source code for the parts of OpenSSL used as well
* as that of the covered work.
*/
#include "audioprocessing.h"
#include "audio/algorithm.h"
AudioProcessing::AudioProcessing (Algorithm *_algo) : _algorithm (_algo) {}
AudioProcessing::~AudioProcessing (void) {}
void AudioProcessing::resetAlgorithm (void)
{
if (_algorithm)
_algorithm->reset();
}
int AudioProcessing::getData (SFLDataFormat *outputData)
{
if (_algorithm)
return _algorithm->getData (outputData);
else
return 0;
}
void AudioProcessing::putData (SFLDataFormat *inputData, int nbBytes)
{
if (_algorithm)
_algorithm->putData (inputData, nbBytes);
}
void AudioProcessing::processAudio (SFLDataFormat *inputData, int nbBytes)
{
if (_algorithm)
_algorithm->process (inputData, nbBytes);
}
int AudioProcessing::processAudio (SFLDataFormat *inputData, SFLDataFormat *outputData, int nbBytes)
{
if (_algorithm)
return _algorithm->process (inputData, outputData, nbBytes);
else
return 0;
}
/*
* Copyright (C) 2004, 2005, 2006, 2008, 2009, 2010, 2011 Savoir-Faire Linux Inc.
* Author: Alexandre Savard <alexandre.savard@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* Additional permission under GNU GPL version 3 section 7:
*
* If you modify this program, or any covered work, by linking or
* combining it with the OpenSSL project's OpenSSL library (or a
* modified version of that library), containing parts covered by the
* terms of the OpenSSL or SSLeay licenses, Savoir-Faire Linux Inc.
* grants you additional permission to convey the resulting work.
* Corresponding Source for a non-source form of such a combination
* shall include the source code for the parts of OpenSSL used as well
* as that of the covered work.
*/
#ifndef AUDIOPROCESSING_H
#define AUDIOPROCESSING_H
#include "global.h"
class Algorithm;
/**
* Process audio buffers using specified at instantiation which may be
* changed dynamically at runtime.
*/
class AudioProcessing
{
public:
/**
* The constructor for this class
*/
AudioProcessing (Algorithm *_algo);
~AudioProcessing (void);
/**
* Set a new algorithm to process audio. Algorithm must be a subclass of abstract class Algorithm
*/
void setAlgorithm (Algorithm *_algo) {
_algorithm = _algo;
}
/**
* Reset parameters for the algorithm
*/
void resetAlgorithm();
/**
* Put data in internal buffer
*/
void putData (SFLDataFormat *inputData, int nbBytes);
/**
* Get data from internal buffer
*/
int getData (SFLDataFormat *outputData);
/**
* Process some audio data
*/
void processAudio (SFLDataFormat *inputData, int nbBytes);
/**
* Process some audio data
*/
int processAudio (SFLDataFormat *inputData, SFLDataFormat *outputData, int nbBytes);
private:
Algorithm *_algorithm;
};
#endif
......@@ -39,7 +39,6 @@ using std::ptrdiff_t;
#include "sip/sipcall.h"
#include "audio/codecs/audiocodec.h"
#include "audio/samplerateconverter.h"
#include "audio/audioprocessing.h"
#include "audio/noisesuppress.h"
#include "audio/speexechocancel.h"
#include "audio/echosuppress.h"
......
......@@ -35,7 +35,6 @@
#include <cc++/thread.h>
#include <speex/speex_preprocess.h>
#include "audioprocessing.h"
#include "ringbuffer.h"
#include "delaydetection.h"
......
......@@ -11,7 +11,6 @@
#include "pjmedia/echo.h"
#include "pj/pool.h"
#include "audioprocessing.h"
#include "audio/algorithm.h"
class EchoSuppress : public Algorithm {
......
......@@ -33,7 +33,6 @@
#include <speex/speex_preprocess.h>
#include "algorithm.h"
#include "audioprocessing.h"
class NoiseSuppress : public Algorithm
......
......@@ -33,7 +33,6 @@
#include "audiostream.h"
#include "pulselayer.h"
#include "audio/samplerateconverter.h"
#include "audio/audioprocessing.h"
#include "audio/dcblocker.h"
#include "managerimpl.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment