Mema
Memory Matrix — multi-channel audio matrix monitor and router
Loading...
Searching...
No Matches
ProcessorAudioSignalData.cpp
Go to the documentation of this file.
1
/* Copyright (c) 2024-2025, Christian Ahrens
2
*
3
* This file is part of Mema <https://github.com/ChristianAhrens/Mema>
4
*
5
* This tool is free software; you can redistribute it and/or modify it under
6
* the terms of the GNU Lesser General Public License version 3.0 as published
7
* by the Free Software Foundation.
8
*
9
* This tool is distributed in the hope that it will be useful, but WITHOUT
10
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12
* details.
13
*
14
* You should have received a copy of the GNU Lesser General Public License
15
* along with this tool; if not, write to the Free Software Foundation, Inc.,
16
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17
*/
18
19
#include "
ProcessorAudioSignalData.h
"
20
21
namespace
Mema
22
{
23
24
ProcessorAudioSignalData::ProcessorAudioSignalData
()
25
{
26
m_type
=
AudioSignal
;
27
28
m_sampleRate = 0;
29
}
30
31
ProcessorAudioSignalData::~ProcessorAudioSignalData
()
32
{
33
34
}
35
36
void
ProcessorAudioSignalData::SetChannelCount
(
unsigned
long
count)
37
{
38
setSize(
static_cast<
int
>
(count), getNumSamples(),
true
,
false
,
true
);
39
}
40
41
unsigned
long
ProcessorAudioSignalData::GetChannelCount
()
42
{
43
return
getNumChannels();
44
}
45
46
void
ProcessorAudioSignalData::SetSampleRate
(
unsigned
long
rate)
47
{
48
m_sampleRate = rate;
49
}
50
51
unsigned
long
ProcessorAudioSignalData::GetSampleRate
()
52
{
53
return
m_sampleRate;
54
}
55
56
}
ProcessorAudioSignalData.h
Mema::AbstractProcessorData::AudioSignal
@ AudioSignal
Raw audio buffer data.
Definition
AbstractProcessorData.h:36
Mema::AbstractProcessorData::m_type
Type m_type
Definition
AbstractProcessorData.h:53
Mema::ProcessorAudioSignalData::ProcessorAudioSignalData
ProcessorAudioSignalData()
Definition
ProcessorAudioSignalData.cpp:24
Mema::ProcessorAudioSignalData::GetSampleRate
unsigned long GetSampleRate()
Returns the sample rate associated with this buffer.
Definition
ProcessorAudioSignalData.cpp:51
Mema::ProcessorAudioSignalData::SetSampleRate
void SetSampleRate(unsigned long rate)
Sets the sample rate associated with this buffer.
Definition
ProcessorAudioSignalData.cpp:46
Mema::ProcessorAudioSignalData::~ProcessorAudioSignalData
~ProcessorAudioSignalData()
Definition
ProcessorAudioSignalData.cpp:31
Mema::ProcessorAudioSignalData::GetChannelCount
unsigned long GetChannelCount() override
Returns the number of channels in the audio buffer.
Definition
ProcessorAudioSignalData.cpp:41
Mema::ProcessorAudioSignalData::SetChannelCount
void SetChannelCount(unsigned long count) override
Sets the number of channels in the audio buffer.
Definition
ProcessorAudioSignalData.cpp:36
Mema
Definition
Mema.cpp:27
Source
MemaProcessor
ProcessorAudioSignalData.cpp
Generated by
1.9.8