// Copyright (c) 2023 Dominic Masters // // This software is released under the MIT License. // https://opensource.org/licenses/MIT #pragma once #include "../Asset.hpp" #include "../AssetLoader.hpp" namespace Dawn { class AudioSource; class AudioAsset : public Asset { protected: AssetLoader loader; uint8_t state = 0x00; int32_t channelCount; uint32_t sampleRate; int32_t samplesPerChannel; size_t bufferSize; size_t bufferStart; size_t frameSize; public: AudioAsset(AssetManager *man, std::string name); void updateSync() override; void updateAsync() override; friend class AudioSource; }; }