AudioBufferChannel¶
class AudioBufferChannel
Represents a view to a single channel in an AudioBuffer
.
- See
- AudioBuffer
Operators¶
Name | Description |
---|---|
operator[] | Gets the audio sample at the specified index. |
operator[] | Gets the audio sample at the specified index. |
operator= | Sets the entire channel data from the provided vector. |
operator= | Sets the entire channel data from the provided AudioBufferChannel . |
operator+= | Performs point-wise addition of this channel with the provided AudioBufferChannel . |
operator-= | Performs point-wise subtraction of this channel with the provided AudioBufferChannel . |
operator*= | Point-wise multiplies this channel with the provided AudioBufferChannel . |
operator*= | Point-wise multiplies this channel with the provided scalar. |
Functions¶
Name | Description |
---|---|
size | Gets the size of the buffer. |
begin | Returns a float pointer to the beginning of the channel data. |
begin | Returns a const float pointer to the beginning of the channel data. |
end | Returns a float pointer to the end of the channel data. |
end | Returns a const float pointer to the end of the channel data. |
clear | Clears the channel data with zero. |
enabled | Checks if the channel is enabled. |
Operator Details¶
operator*=¶
AudioBufferChannel& operator*=(const AudioBufferChannel& channel)
Point-wise multiplies this channel with the provided AudioBufferChannel
.
- Parameter
channel
- The
AudioBufferChannel
to multiply with. - Return
- A reference to the modified channel.
AudioBufferChannel& operator*=(AmReal32 scalar)
Point-wise multiplies this channel with the provided scalar.
- Parameter
scalar
- The scalar to multiply with.
- Return
- A reference to the modified channel.
operator+=¶
AudioBufferChannel& operator+=(const AudioBufferChannel& channel)
Performs point-wise addition of this channel with the provided AudioBufferChannel
.
- Parameter
channel
- The
AudioBufferChannel
to add. - Return
- A reference to the modified channel.
operator-=¶
AudioBufferChannel& operator-=(const AudioBufferChannel& channel)
Performs point-wise subtraction of this channel with the provided AudioBufferChannel
.
- Parameter
channel
- The
AudioBufferChannel
to subtract. - Return
- A reference to the modified channel.
operator=¶
AudioBufferChannel& operator=(const std::vector<AmReal32>& data)
Sets the entire channel data from the provided vector.
- Parameter
data
- The vector containing the new channel data.
- Return
- A reference to the modified channel.
AudioBufferChannel& operator=(const AudioBufferChannel& channel)
Sets the entire channel data from the provided AudioBufferChannel
.
- Parameter
channel
- The
AudioBufferChannel
to copy the data from. - Return
- A reference to the modified channel.
operator[]¶
Gets the audio sample at the specified index.
- Parameter
index
- The audio sample index.
- Return
- The audio sample at the specified index.
[[nodiscard]] const AmReal32& operator const
Gets the audio sample at the specified index.
- Parameter
index
- The audio sample index.
- Return
- The audio sample at the specified index.
Function Details¶
begin¶
AmReal32* begin()
Returns a float pointer to the beginning of the channel data.
- Return
- A float pointer to the beginning of the channel data.
[[nodiscard]] const AmReal32* begin() const
Returns a const float pointer to the beginning of the channel data.
- Return
- A const float pointer to the beginning of the channel data.
clear¶
void clear()
Clears the channel data with zero.
enabled¶
[[nodiscard]] bool enabled() const
Checks if the channel is enabled.
- Return
true
if the channel is enabled,false
otherwise.
end¶
AmReal32* end()
Returns a float pointer to the end of the channel data.
- Return
- A float pointer to the end of the channel data.
[[nodiscard]] const AmReal32* end() const
Returns a const float pointer to the end of the channel data.
- Return
- A const float pointer to the end of the channel data.
size¶
[[nodiscard]] AmSize size() const
Gets the size of the buffer.
- Return
- The size of the buffer.