summaryrefslogtreecommitdiff
path: root/src/audiofile.h
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2024-03-30 18:28:27 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2024-03-30 18:28:27 +0100
commit961470a2f85e5ebc35287c6a9f245a8610f35f90 (patch)
tree354d56f9ef17958e62d62156027ed336b7810bb6 /src/audiofile.h
parent255e757419aed5bce8254b3fbf28f0f8da3eeba6 (diff)
Linter fixes for audiofile.cc
Diffstat (limited to 'src/audiofile.h')
-rw-r--r--src/audiofile.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/audiofile.h b/src/audiofile.h
index 504d0ae..9fdd8c5 100644
--- a/src/audiofile.h
+++ b/src/audiofile.h
@@ -35,24 +35,26 @@
#include "audio.h"
#include "channel.h"
#include "logger.h"
+#include "owner.h"
class InstrumentChannel;
class AudioFile
{
public:
- AudioFile(const std::string& filename, std::size_t filechannel,
+ AudioFile(std::string filename, std::size_t filechannel,
InstrumentChannel* instrument_channel = nullptr);
~AudioFile();
- void load(LogFunction logger, std::size_t sample_limit = std::numeric_limits<std::size_t>::max());
+ void load(const LogFunction& logger,
+ std::size_t sample_limit = std::numeric_limits<std::size_t>::max());
void unload();
bool isLoaded() const;
volatile std::size_t size{0}; // Full size of the file
volatile std::size_t preloadedsize{0}; // Number of samples preloaded (in data)
- sample_t* data{nullptr};
+ gsl::owner<sample_t*> data{nullptr};
std::string filename;
@@ -70,7 +72,7 @@ private:
friend class DOMLoaderTest;
friend class InstrumentParserTest;
- void* magic{nullptr};
+ void* magic{};
volatile bool is_loaded{false};
- InstrumentChannel* instrument_channel;
+ InstrumentChannel* instrument_channel{};
};