Audaspace
1.9.0
A high level audio library.
Toggle main menu visibility
Loading...
Searching...
No Matches
fx
ImpulseResponse.h
Go to the documentation of this file.
1
/*******************************************************************************
2
* Copyright 2015-2016 Juan Francisco Crespo Galán
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
24
25
#include "
util/StreamBuffer.h
"
26
#include "
util/FFTPlan.h
"
27
#include "
IReader.h
"
28
29
#include <memory>
30
#include <vector>
31
32
AUD_NAMESPACE_BEGIN
33
40
class
AUD_API
ImpulseResponse
41
{
42
private
:
48
std::vector<std::shared_ptr<std::vector<std::shared_ptr<std::vector<std::complex<sample_t>>>>>> m_processedIR;
49
53
Specs
m_specs;
54
58
int
m_length;
59
60
// delete copy constructor and operator=
61
ImpulseResponse(
const
ImpulseResponse&) =
delete
;
62
ImpulseResponse& operator=(
const
ImpulseResponse&) =
delete
;
63
64
public
:
71
ImpulseResponse
(std::shared_ptr<StreamBuffer> impulseResponse, std::shared_ptr<FFTPlan> plan);
72
78
ImpulseResponse
(std::shared_ptr<StreamBuffer> impulseResponse);
79
84
Specs
getSpecs
();
85
90
int
getLength
();
91
97
std::shared_ptr<std::vector<std::shared_ptr<std::vector<std::complex<sample_t>>>>>
getChannel
(
int
n);
98
99
private
:
105
void
processImpulseResponse(std::shared_ptr<IReader> reader, std::shared_ptr<FFTPlan> plan);
106
};
107
108
AUD_NAMESPACE_END
AUD_NAMESPACE_END
#define AUD_NAMESPACE_END
Closes the audaspace namespace aud.
Definition
Audaspace.h:119
AUD_NAMESPACE_BEGIN
#define AUD_NAMESPACE_BEGIN
Opens the audaspace namespace aud.
Definition
Audaspace.h:116
AUD_API
#define AUD_API
Used for exporting symbols in the shared library.
Definition
Audaspace.h:93
FFTPlan.h
The FFTPlan class.
IReader.h
The IReader interface.
StreamBuffer.h
The StreamBuffer class.
ImpulseResponse::ImpulseResponse
ImpulseResponse(std::shared_ptr< StreamBuffer > impulseResponse, std::shared_ptr< FFTPlan > plan)
Creates a new ImpulseResponse object.
ImpulseResponse::ImpulseResponse
ImpulseResponse(std::shared_ptr< StreamBuffer > impulseResponse)
Creates a new ImpulseResponse object.
ImpulseResponse::getLength
int getLength()
Retrieves the length of the impulse response.
ImpulseResponse::getChannel
std::shared_ptr< std::vector< std::shared_ptr< std::vector< std::complex< sample_t > > > > > getChannel(int n)
Retrieves one channel of the impulse response.
ImpulseResponse::getSpecs
Specs getSpecs()
Returns the specification of the impulse response.
Specs
Specification of a sound source.
Definition
Specification.h:119
Generated by
1.17.0