|
3DRadSpace 0.1.0Alpha
3DRadSpace is a free, simple to use, rapid application development game engine.
|
Represents a PCM audio buffer. More...
#include <AudioBuffer.hpp>


Public Types | |
| enum class | WAVLoadError |
| Type of loading error that could occur when loading a WAV file. More... | |
| enum class | OGGLoadError |
| Type of loading error that could occur when loading an OGG file. More... | |
Public Member Functions | |
| AudioBuffer (IntPtr buffer, int numChannels, int sampleRate, int bps, int format, int size) | |
| AudioBuffer (char *buffer, int numChannels, int sampleRate, int bps, int format, int size) | |
| Constructs a AudioBuffer from specified arguments. | |
| AudioBuffer (const AudioBuffer &)=delete | |
| AudioBuffer (AudioBuffer &&other) noexcept=default | |
| Move constructor. Transfers ownership of the PCM buffer to this instance. | |
| AudioBuffer & | operator= (const AudioBuffer &)=delete |
| AudioBuffer & | operator= (AudioBuffer &&other) noexcept=default |
| Move assignment operator. Transfers ownership of the PCM buffer to this instance. | |
| ~AudioBuffer ()=default | |
| Destructor. Releases the PCM buffer. | |
| Public Member Functions inherited from Engine3DRadSpace.NatPtrWrapper | |
| virtual void | Dispose () |
Static Public Member Functions | |
| static AudioBuffer | FromWAV (string path) |
| static AudioBuffer | FromOGG (string path) |
| static std::expected< AudioBuffer, WAVLoadError > | FromWAV (const std::filesystem::path &path) |
| Loads a WAV file from the given path and returns an AudioBuffer instance. | |
| static std::expected< AudioBuffer, OGGLoadError > | FromOGG (const std::filesystem::path &path) |
| Loads an OGG file from the given path and returns an AudioBuffer instance. | |
Protected Attributes | |
| std::unique_ptr< char[]> | _buffer |
| int | _channel = 0 |
| int | _sampleRate = 0 |
| int | _bps = 0 |
| int | _format = 0 |
| int | _size = 0 |
| Protected Attributes inherited from Engine3DRadSpace.NatPtrWrapper | |
| IntPtr | _handle |
| bool | _disposed |
Friends | |
| class | Sound |
Additional Inherited Members | |
| Protected Member Functions inherited from Engine3DRadSpace.NatPtrWrapper | |
| NatPtrWrapper (IntPtr handle, Action< IntPtr > fnDestroy) | |
| NatPtrWrapper (Action< IntPtr > fnDestroy) | |
| void | Reset (IntPtr newObj) |
| void | Dispose (bool disposing) |
| Properties inherited from Engine3DRadSpace.NatPtrWrapper | |
| IntPtr | Handle [get] |
Represents a PCM audio buffer.
|
strong |
Type of loading error that could occur when loading an OGG file.
|
strong |
Type of loading error that could occur when loading a WAV file.
|
inline |
| AudioBuffer::AudioBuffer | ( | char * | buffer, |
| int | numChannels, | ||
| int | sampleRate, | ||
| int | bps, | ||
| int | format, | ||
| int | size ) |
Constructs a AudioBuffer from specified arguments.
| buffer | PCM buffer |
| numChannels | Number of channels |
| sampleRate | Audio sample rate |
| bps | Beats per second |
| format | OpenAL format |
| size | Buffer size |
|
delete |
|
defaultnoexcept |
Move constructor. Transfers ownership of the PCM buffer to this instance.
| other | The AudioBuffer instance to move from |
|
default |
Destructor. Releases the PCM buffer.
|
inlinestatic |
|
static |
Loads an OGG file from the given path and returns an AudioBuffer instance.
| path | Path to the OGG file |
|
inlinestatic |
|
static |
Loads a WAV file from the given path and returns an AudioBuffer instance.
|
defaultnoexcept |
Move assignment operator. Transfers ownership of the PCM buffer to this instance.
| other | The AudioBuffer instance to move from |
|
delete |
|
friend |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |