Switchboard Extension SDK
Loading...
Searching...
No Matches
AudioBusFormat.hpp
1//
2// AudioBusFormat.hpp
3// SwitchboardSDK
4//
5// Created by Balázs Kiss on 2022. 05. 19..
6// Copyright © 2022. Synervoz Inc. All rights reserved.
7//
8
9#pragma once
10
11#include <switchboard/export.h>
12#include <switchboard_core/SwitchboardCore.hpp>
13#include <vector>
14
15namespace switchboard {
16
22struct SWITCHBOARDSDK_EXPORT AudioBusFormat {
23public:
26
29
32
36 AudioBusFormat() SWITCHBOARD_REALTIME;
37
45 AudioBusFormat(uint sampleRate, uint numberOfChannels, uint numberOfFrames) SWITCHBOARD_REALTIME;
46
53 bool isSet() const SWITCHBOARD_REALTIME;
54
59 void reset();
60
68 bool operator==(const AudioBusFormat& other) const;
69
77 bool operator!=(const AudioBusFormat& other) const;
78
88 static bool matchBusFormats(AudioBusFormat& busFormat1, AudioBusFormat& busFormat2);
89
95 std::string toString() const;
96};
97
98}
void reset()
Resets the audio bus format properties.
static bool matchBusFormats(AudioBusFormat &busFormat1, AudioBusFormat &busFormat2)
Matches two AudioBusFormat instances.
uint numberOfFrames
Number of frames.
Definition AudioBusFormat.hpp:31
std::string toString() const
Returns a string representing the object.
AudioBusFormat() SWITCHBOARD_REALTIME
Initializes an AudioBusFormat instance with zero values.
uint numberOfChannels
Number of channels.
Definition AudioBusFormat.hpp:28
uint sampleRate
Sample rate.
Definition AudioBusFormat.hpp:25
bool isSet() const SWITCHBOARD_REALTIME
Returns whether the audio bus format is completely defined.