Switchboard Extension SDK
Toggle main menu visibility
Loading...
Searching...
No Matches
AudioBus.hpp
1
//
2
// AudioBus.hpp
3
// SwitchboardSDK
4
//
5
// Created by Balázs Kiss on 2022. 03. 19..
6
// Copyright © 2022. Synervoz Inc. All rights reserved.
7
//
8
9
#pragma once
10
11
#include "AudioBuffer.hpp"
12
#include "AudioBusFormat.hpp"
13
#include <switchboard/export.h>
14
15
namespace
switchboard {
16
22
struct
SWITCHBOARDSDK_EXPORT
AudioBus
{
27
AudioBuffer<float>
*
buffer
=
nullptr
;
28
32
AudioBus
() =
default
;
33
39
AudioBus
(
AudioBuffer<float>
*
buffer
);
40
46
[[nodiscard]]
AudioBusFormat
getFormat
()
const
;
47
53
void
setFormat
(
const
AudioBusFormat
& newFormat);
54
60
AudioBuffer<float>
*
getBuffer
()
const
;
61
67
void
setBuffer
(
AudioBuffer<float>
* newBuffer);
68
74
[[nodiscard]]
bool
isConnected
()
const
;
75
79
void
copyFrom
(
const
AudioBus
& srcAudioBus);
80
84
void
clear
();
85
86
private
:
87
AudioBusFormat
format;
88
};
89
90
}
switchboard::AudioBuffer
Provides an abstraction around raw audio buffers stored in memory.
Definition
AudioBuffer.hpp:22
switchboard::AudioBusFormat
Describes the format of an AudioBus instance without the need for the audio data.
Definition
AudioBusFormat.hpp:23
switchboard::AudioBus::isConnected
bool isConnected() const
Checks if the audio bus is connected to another audio bus.
switchboard::AudioBus::setFormat
void setFormat(const AudioBusFormat &newFormat)
Sets the format of the audio bus.
switchboard::AudioBus::setBuffer
void setBuffer(AudioBuffer< float > *newBuffer)
Sets the audio buffer of the audio bus.
switchboard::AudioBus::AudioBus
AudioBus()=default
Default audioBus constructor.
switchboard::AudioBus::getFormat
AudioBusFormat getFormat() const
Gets the format of the audio bus.
switchboard::AudioBus::clear
void clear()
Sets the content of the audio bus to zero.
switchboard::AudioBus::AudioBus
AudioBus(AudioBuffer< float > *buffer)
AudioBus constructor.
switchboard::AudioBus::buffer
AudioBuffer< float > * buffer
The audio buffer that contains the audio data.
Definition
AudioBus.hpp:27
switchboard::AudioBus::getBuffer
AudioBuffer< float > * getBuffer() const
Gets the audio buffer of the audio bus.
switchboard::AudioBus::copyFrom
void copyFrom(const AudioBus &srcAudioBus)
Copies another AudioBus instance.
SwitchboardSDK
include
switchboard_core
AudioBus.hpp
Generated by
1.17.0