GenericSoundResource struct
#include <Jazz2/Resources.h>
Shared sound resource.
Loaded, cached audio buffer for a single sound file, decoded on construction from a stream (the file name is used to detect the format), together with its resource flags. Owned by ContentResolver and referenced by the SoundResource entries that group the buffers belonging to one named metadata sound.
Constructors, destructors, conversion operators
-
GenericSoundResource(std::
unique_ptr<Stream> stream, StringView filename) noexcept - Creates a new instance from a stream.
Public variables
- AudioBuffer Buffer
- Audio buffer.
- GenericSoundResourceFlags Flags
- Resource flags.
Function documentation
Jazz2:: Resources:: GenericSoundResource:: GenericSoundResource(std:: unique_ptr<Stream> stream,
StringView filename) noexcept
Creates a new instance from a stream.
| Parameters | |
|---|---|
| stream | Stream containing the sound data |
| filename | File name used to detect the audio format |