Skip to content
Snippets Groups Projects
Commit 3e1e9421 authored by Rafaël Carré's avatar Rafaël Carré
Browse files

audio algorithms : remove unused prototype

parent 5c6f484c
Branches
Tags
No related merge requests found
Showing
with 0 additions and 82 deletions
...@@ -67,15 +67,6 @@ class Algorithm ...@@ -67,15 +67,6 @@ class Algorithm
*/ */
virtual int process (SFLDataFormat *inputData, SFLDataFormat *outputData, int nbBytes) = 0; virtual int process (SFLDataFormat *inputData, SFLDataFormat *outputData, int nbBytes) = 0;
/**
* Class implementing this interface must define this function
* for audio processing that require synchronization between spkr and mic
* \param micData
* \param spkrData
* \param outputData
*/
virtual void process (SFLDataFormat *micData, SFLDataFormat *spkrData, SFLDataFormat *outputData, int nbBytes) = 0;
}; };
#endif #endif
...@@ -71,10 +71,3 @@ int AudioProcessing::processAudio (SFLDataFormat *inputData, SFLDataFormat *outp ...@@ -71,10 +71,3 @@ int AudioProcessing::processAudio (SFLDataFormat *inputData, SFLDataFormat *outp
else else
return 0; return 0;
} }
void AudioProcessing::processAudio (SFLDataFormat *micData, SFLDataFormat *spkrData, SFLDataFormat *outputData, int nbBytes)
{
if (_algorithm)
_algorithm->process (micData, spkrData, outputData, nbBytes);
}
...@@ -83,11 +83,6 @@ class AudioProcessing ...@@ -83,11 +83,6 @@ class AudioProcessing
*/ */
int processAudio (SFLDataFormat *inputData, SFLDataFormat *outputData, int nbBytes); int processAudio (SFLDataFormat *inputData, SFLDataFormat *outputData, int nbBytes);
/**
* Process some audio data.
*/
void processAudio (SFLDataFormat *micData, SFLDataFormat *spkrData, SFLDataFormat *outputData, int nbBytes);
private: private:
Algorithm *_algorithm; Algorithm *_algorithm;
......
...@@ -86,5 +86,3 @@ int DcBlocker::process (SFLDataFormat *inputData, SFLDataFormat *outputData, int ...@@ -86,5 +86,3 @@ int DcBlocker::process (SFLDataFormat *inputData, SFLDataFormat *outputData, int
return 0; return 0;
} }
void DcBlocker::process (SFLDataFormat *micData UNUSED, SFLDataFormat *spkrData UNUSED, SFLDataFormat *outputData UNUSED, int nbBytes UNUSED) {}
...@@ -69,14 +69,6 @@ class DcBlocker : public Algorithm ...@@ -69,14 +69,6 @@ class DcBlocker : public Algorithm
*/ */
virtual int process (SFLDataFormat *inputData, SFLDataFormat *outputData, int nbBytes); virtual int process (SFLDataFormat *inputData, SFLDataFormat *outputData, int nbBytes);
/**
* Perform echo cancellation, application must provide its own buffer
* \param micData containing mixed echo and voice data
* \param spkrData containing far-end voice data to be sent to speakers
* \param outputData containing the processed data
*/
virtual void process (SFLDataFormat *micData, SFLDataFormat *spkrData, SFLDataFormat *outputData, int nbBytes);
private: private:
SFLDataFormat _y, _x, _xm1, _ym1; SFLDataFormat _y, _x, _xm1, _ym1;
......
...@@ -217,8 +217,6 @@ int DelayDetection::process (SFLDataFormat *intputData UNUSED, SFLDataFormat *ou ...@@ -217,8 +217,6 @@ int DelayDetection::process (SFLDataFormat *intputData UNUSED, SFLDataFormat *ou
return 0; return 0;
} }
void DelayDetection::process (SFLDataFormat *micData UNUSED, SFLDataFormat *spkrData UNUSED, SFLDataFormat *outputData UNUSED, int nbBytes UNUSED) {}
void DelayDetection::crossCorrelate (float *ref, float *seg, float *res, int refSize, int segSize) void DelayDetection::crossCorrelate (float *ref, float *seg, float *res, int refSize, int segSize)
{ {
......
...@@ -114,8 +114,6 @@ class DelayDetection : public Algorithm ...@@ -114,8 +114,6 @@ class DelayDetection : public Algorithm
virtual int process (SFLDataFormat *inputData, SFLDataFormat *outputData, int nbBytes); virtual int process (SFLDataFormat *inputData, SFLDataFormat *outputData, int nbBytes);
virtual void process (SFLDataFormat *micData, SFLDataFormat *spkrData, SFLDataFormat *outputData, int nbBytes);
private: private:
enum State { enum State {
......
...@@ -330,11 +330,6 @@ int EchoCancel::process (SFLDataFormat *inputData, SFLDataFormat *outputData, in ...@@ -330,11 +330,6 @@ int EchoCancel::process (SFLDataFormat *inputData, SFLDataFormat *outputData, in
return nbFrame * _smplPerFrame; return nbFrame * _smplPerFrame;
} }
void EchoCancel::process (SFLDataFormat *micData UNUSED, SFLDataFormat *spkrData UNUSED, SFLDataFormat *outputData UNUSED, int nbBytes UNUSED)
{
}
void EchoCancel::setSamplingRate (int smplRate) void EchoCancel::setSamplingRate (int smplRate)
{ {
......
...@@ -106,14 +106,6 @@ class EchoCancel : public Algorithm ...@@ -106,14 +106,6 @@ class EchoCancel : public Algorithm
*/ */
virtual int process (SFLDataFormat *inputData, SFLDataFormat *outputData, int nbBytes); virtual int process (SFLDataFormat *inputData, SFLDataFormat *outputData, int nbBytes);
/**
* Perform echo cancellation, application must provide its own buffer
* \param micData containing mixed echo and voice data
* \param spkrData containing far-end voice data to be sent to speakers
* \param outputData containing the processed data
*/
virtual void process (SFLDataFormat *micData, SFLDataFormat *spkrData, SFLDataFormat *outputData, int nbBytes);
/** /**
* Set echo canceller internal sampling rate, reset if sampling rate changed * Set echo canceller internal sampling rate, reset if sampling rate changed
*/ */
......
...@@ -74,5 +74,3 @@ int EchoSuppress::getData(SFLDataFormat *outputData) ...@@ -74,5 +74,3 @@ int EchoSuppress::getData(SFLDataFormat *outputData)
void EchoSuppress::process (SFLDataFormat *data UNUSED, int nbBytes UNUSED) {} void EchoSuppress::process (SFLDataFormat *data UNUSED, int nbBytes UNUSED) {}
int EchoSuppress::process (SFLDataFormat *inputData, SFLDataFormat *outputData, int nbBytes) { return 0; } int EchoSuppress::process (SFLDataFormat *inputData, SFLDataFormat *outputData, int nbBytes) { return 0; }
void EchoSuppress::process (SFLDataFormat *micData UNUSED, SFLDataFormat *spkrData UNUSED, SFLDataFormat *outputData UNUSED, int nbBytes UNUSED) {}
...@@ -40,16 +40,6 @@ public: ...@@ -40,16 +40,6 @@ public:
* \param outputData containing * \param outputData containing
*/ */
virtual int process (SFLDataFormat *, SFLDataFormat *, int); virtual int process (SFLDataFormat *, SFLDataFormat *, int);
/**
* Perform echo cancellation, application must provide its own buffer
* \param micData containing mixed echo and voice data
* \param spkrData containing far-end voice data to be sent to speakers
* \param outputData containing the processed data
* \param size in bytes
*/
virtual void process (SFLDataFormat *, SFLDataFormat *, SFLDataFormat *, int);
private: private:
/** /**
......
...@@ -69,8 +69,6 @@ int NoiseSuppress::process (SFLDataFormat *inputData, SFLDataFormat *outputData, ...@@ -69,8 +69,6 @@ int NoiseSuppress::process (SFLDataFormat *inputData, SFLDataFormat *outputData,
return 0; return 0;
} }
void NoiseSuppress::process (SFLDataFormat *micData, SFLDataFormat *spkrData, SFLDataFormat *outputData, int nbBytes) {}
void NoiseSuppress::initNewNoiseSuppressor (int smplPerFrame, int samplingRate) void NoiseSuppress::initNewNoiseSuppressor (int smplPerFrame, int samplingRate)
{ {
_noiseState = speex_preprocess_state_init (smplPerFrame, samplingRate); _noiseState = speex_preprocess_state_init (smplPerFrame, samplingRate);
......
...@@ -70,11 +70,6 @@ class NoiseSuppress : public Algorithm ...@@ -70,11 +70,6 @@ class NoiseSuppress : public Algorithm
*/ */
virtual int process (SFLDataFormat *inputData, SFLDataFormat *outputData, int nbBytes); virtual int process (SFLDataFormat *inputData, SFLDataFormat *outputData, int nbBytes);
/**
* Unused
*/
virtual void process (SFLDataFormat *micData, SFLDataFormat *spkrData, SFLDataFormat *outputData, int nbBytes);
private: private:
void initNewNoiseSuppressor (int _smplPerFrame, int samplingRate); void initNewNoiseSuppressor (int _smplPerFrame, int samplingRate);
......
...@@ -205,8 +205,3 @@ int SpeexEchoCancel::process (SFLDataFormat *inputData, SFLDataFormat *outputDat ...@@ -205,8 +205,3 @@ int SpeexEchoCancel::process (SFLDataFormat *inputData, SFLDataFormat *outputDat
return nbFrame * EC_FRAME_SIZE * sizeof(SFLDataFormat); return nbFrame * EC_FRAME_SIZE * sizeof(SFLDataFormat);
} }
void SpeexEchoCancel::process (SFLDataFormat *micData UNUSED, SFLDataFormat *spkrData UNUSED, SFLDataFormat *outputData UNUSED, int nbBytes UNUSED)
{
}
...@@ -57,16 +57,6 @@ class SpeexEchoCancel : public Algorithm ...@@ -57,16 +57,6 @@ class SpeexEchoCancel : public Algorithm
*/ */
virtual int process (SFLDataFormat *, SFLDataFormat *, int); virtual int process (SFLDataFormat *, SFLDataFormat *, int);
/**
* Perform echo cancellation, application must provide its own buffer
* \param micData containing mixed echo and voice data
* \param spkrData containing far-end voice data to be sent to speakers
* \param outputData containing the processed data
* \param size in bytes
*/
virtual void process (SFLDataFormat *, SFLDataFormat *, SFLDataFormat *, int);
private: private:
SpeexEchoState *_echoState; SpeexEchoState *_echoState;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment