1#ifndef _VAE_SOURCE_LOADER
2#define _VAE_SOURCE_LOADER
4#include "../vae_types.hpp"
5#include "../vae_config.hpp"
6#include "../vae_util.hpp"
7#include "../pod/vae_source.hpp"
10 #include "../../../external/tklb/src/types/audio/TWaveFile.hpp"
12#include "../../../external/tklb/src/types/audio/TOggFile.hpp"
14#include "../../wrapped/vae_fs.hpp"
16namespace vae {
namespace core {
31 data = joinedPath.
c_str();
37 data = joinedPath.
data();
49 bool success = tklb::wave::load<Sample, AudioBuffer>(data, s.
signal, length);
54 auto result = tklb::ogg::load<Sample, AudioBuffer>(data, s.
signal, length);
const char * c_str() const
void append(const String &str)
Contains Typedefinitions and basic structures use by the public API and internally.
unsigned int Size
How the elements are addressed in the heapbuffer.
Result
Return Types for most engine functions.
@ FileOpenError
File system could not load file.
AudioBuffer signal
Audio signal itself loaded by SourceLoader.
bool stream
If false entire sample will be loaded in ram, there's no streaming for now.
@ ogg
Uses stb_vorbis to decode oggs.
@ wav
Uses dr_wav to decode wavs.
PathString path
Filesystem path.
enum vae::core::Source::Format format
bool raw
The data in path is a data buffer.
Result load(Source &s, const char *path)
Loads a wav file for the resource.
#define VAE_PROFILER_SCOPE_NAMED(name)
Profiles a scope and names it.