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
14
#include <switchboard/export.h>
15
16
namespace
switchboard {
17
23
struct
SWITCHBOARDSDK_EXPORT
AudioBus
{
28
AudioBuffer<float>
*
buffer
=
nullptr
;
29
33
AudioBus
() =
default
;
34
40
AudioBus
(
AudioBuffer<float>
*
buffer
) SWITCHBOARD_REALTIME;
41
47
[[nodiscard]]
AudioBusFormat
getFormat
() const SWITCHBOARD_REALTIME;
48
54
void
setFormat
(const
AudioBusFormat
& newFormat) SWITCHBOARD_REALTIME;
55
61
AudioBuffer
<
float
>*
getBuffer
() const SWITCHBOARD_REALTIME;
62
68
void
setBuffer
(
AudioBuffer
<
float
>* newBuffer) SWITCHBOARD_REALTIME;
69
75
[[nodiscard]]
bool
isConnected
() const SWITCHBOARD_REALTIME;
76
80
void
copyFrom
(const
AudioBus
& srcAudioBus) SWITCHBOARD_REALTIME;
81
85
void
clear
() SWITCHBOARD_REALTIME;
86
87
private:
88
AudioBusFormat
format;
89
};
90
91
}
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:22
switchboard::AudioBus::clear
void clear() SWITCHBOARD_REALTIME
Sets the content of the audio bus to zero.
switchboard::AudioBus::isConnected
bool isConnected() const SWITCHBOARD_REALTIME
Checks if the audio bus is connected to another audio bus.
switchboard::AudioBus::setBuffer
void setBuffer(AudioBuffer< float > *newBuffer) SWITCHBOARD_REALTIME
Sets the audio buffer of the audio bus.
switchboard::AudioBus::setFormat
void setFormat(const AudioBusFormat &newFormat) SWITCHBOARD_REALTIME
Sets the format of the audio bus.
switchboard::AudioBus::AudioBus
AudioBus()=default
Default audioBus constructor.
switchboard::AudioBus::AudioBus
AudioBus(AudioBuffer< float > *buffer) SWITCHBOARD_REALTIME
AudioBus constructor.
switchboard::AudioBus::buffer
AudioBuffer< float > * buffer
The audio buffer that contains the audio data.
Definition
AudioBus.hpp:28
switchboard::AudioBus::copyFrom
void copyFrom(const AudioBus &srcAudioBus) SWITCHBOARD_REALTIME
Copies another AudioBus instance.
switchboard::AudioBus::getFormat
AudioBusFormat getFormat() const SWITCHBOARD_REALTIME
Gets the format of the audio bus.
switchboard::AudioBus::getBuffer
AudioBuffer< float > * getBuffer() const SWITCHBOARD_REALTIME
Gets the audio buffer of the audio bus.
SwitchboardSDK
include
switchboard_core
AudioBus.hpp
Generated by
1.18.0