gramods
Loading...
Searching...
No Matches
CaptureFromWav.hh
1
2#ifndef GRAMODS_SOUND_CAPTUREFROMWAV
3#define GRAMODS_SOUND_CAPTUREFROMWAV
4
5#include <gmSound/Capture.hh>
6
7#include <memory>
8
9namespace gramods {
10namespace gmSound {
11
17
18public:
20 virtual ~CaptureFromWav();
21
22 void setFile(std::filesystem::path file);
23 void setLoop(bool on);
24 void setExit(bool on);
25
26 size_t getSampleRate() override;
27 size_t getChannelCount() override;
28
29 bool isOpen() override;
30
31 void startCapture() override;
32 void stopCapture() override;
33 std::vector<float> getAvailableSamples() override;
34 size_t getAvailableSamplesCount() override;
35
36 void initialize() override;
37
38 GM_OFI_DECLARE;
39
40private:
41 struct Impl;
42 std::unique_ptr<Impl> _impl;
43};
44}
45}
46
47#endif
The instantiation of this class will attempt to open a capture device and allow for extraction of sam...
Definition CaptureFromWav.hh:16
size_t getChannelCount() override
Sets the number of channels to attempt to open for the capture device.
Definition CaptureFromWav.cpp:99
size_t getSampleRate() override
Returns the sample rate.
Definition CaptureFromWav.cpp:94
void initialize() override
Called to initialize the Object.
Definition CaptureFromWav.cpp:187
The interface for a capture device that allow for extraction of sample data.
Definition Capture.hh:16
Gramods, short for Graphics Modules, is a collection of weakly inter dependent and useful APIs for Vi...
Definition config.hh:25
Definition CaptureFromWav.cpp:23