Audaspace  1.4.0
A high level audio library.
CallbackIIRFilterReader.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright 2009-2016 Jörg Müller
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  ******************************************************************************/
16 
17 #pragma once
18 
25 #include "fx/BaseIIRFilterReader.h"
26 
28 
30 
37 
43 typedef void (*endFilterIIR)(void*);
44 
50 {
51 private:
55  const doFilterIIR m_filter;
56 
60  const endFilterIIR m_endFilter;
61 
65  void* m_data;
66 
67  // delete copy constructor and operator=
69  CallbackIIRFilterReader& operator=(const CallbackIIRFilterReader&) = delete;
70 
71 public:
81  CallbackIIRFilterReader(std::shared_ptr<IReader> reader, int in, int out, doFilterIIR doFilter, endFilterIIR endFilter = 0, void* data = nullptr);
82 
83  virtual ~CallbackIIRFilterReader();
84 
85  virtual sample_t filter();
86 };
87 
#define AUD_NAMESPACE_BEGIN
Opens the audaspace namespace aud.
Definition: Audaspace.h:116
#define AUD_API
Used for exporting symbols in the shared library.
Definition: Audaspace.h:93
This class is a base class for infinite impulse response filters.
Definition: BaseIIRFilterReader.h:32
The BaseIIRFilterReader class.
virtual sample_t filter()=0
Runs the filtering function.
sample_t(* doFilterIIR)(CallbackIIRFilterReader *, void *)
The doFilterIIR callback is executed when a new sample of a callback filter should be calculated...
Definition: CallbackIIRFilterReader.h:36
float sample_t
Sample type.(float samples)
Definition: Audaspace.h:126
#define AUD_NAMESPACE_END
Closes the audaspace namespace aud.
Definition: Audaspace.h:119
This class provides an interface for infinite impulse response filters via a callback filter function...
Definition: CallbackIIRFilterReader.h:49
void(* endFilterIIR)(void *)
The endFilterIIR callback is called when the callback filter is not needed anymore.
Definition: CallbackIIRFilterReader.h:43