Audacity 3.2.0
WavMirAudioReader.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: GPL-2.0-or-later */
2/*!********************************************************************
3
4 Audacity: A Digital Audio Editor
5
6 WaveMirAudioReader.h
7
8 Matthieu Hodgkinson
9
10**********************************************************************/
11#pragma once
12
13#include "MirTypes.h"
14
15#include <optional>
16#include <string>
17#include <vector>
18
19namespace MIR
20{
22{
23public:
25 const std::string& filename, std::optional<double> timeLimit = {});
26
27 double GetSampleRate() const override;
28 long long GetNumSamples() const override;
29 void
30 ReadFloats(float* buffer, long long start, size_t numFrames) const override;
31
32private:
33 const std::vector<float> mSamples;
34 const double mSampleRate = 0.;
35};
36} // namespace MIR
long long GetNumSamples() const override
WavMirAudioReader(const std::string &filename, std::optional< double > timeLimit={})
const std::vector< float > mSamples
double GetSampleRate() const override
void ReadFloats(float *buffer, long long start, size_t numFrames) const override