File main.cpp¶
FileList > examples > WavWriter_Realtime > main.cpp
Go to the source code of this file
#include "daisy_seed.h"#include <cmath>
Classes¶
| Type | Name |
|---|---|
| struct | SimpleOsc <freq> |
Public Types¶
| Type | Name |
|---|---|
| enum | State |
Public Attributes¶
| Type | Name |
|---|---|
| size_t | duration_counter = 0 |
| FatFSInterface | fsi |
| DaisySeed | hw |
| SimpleOsc< 220 > | osc1 |
| SimpleOsc< 330 > | osc2 |
| SdmmcHandler | sdmmc |
| State | state = State::Startup |
| WavWriter< kTransferSize > | wav_writer |
Public Static Attributes¶
| Type | Name |
|---|---|
| constexpr const size_t | kFileDurationSamps = 96000 |
| constexpr const uint32_t | kStartupDelayMs = 2000 |
| constexpr const float | kTargetSr = 48000.f |
| constexpr const size_t | kTransferSize = 16384 |
Public Functions¶
| Type | Name |
|---|---|
| void | AudioCallback (AudioHandle::InputBuffer in, AudioHandle::OutputBuffer out, size_t size) |
| int | main (void) |
Public Types Documentation¶
enum State¶
Enum for tracking the state of our example process
We will begin in "startup" for a set duration, prior to recording. Then transition to recording, where the WAV file will be recorded from audio in the real time engine. After the duration of the recording has passed, we'll finalize the WAV file, and update to Done.
Public Attributes Documentation¶
variable duration_counter¶
variable fsi¶
variable hw¶
Global Hardware access
variable osc1¶
variable osc2¶
variable sdmmc¶
variable state¶
variable wav_writer¶
Globals used for recording our WAV file
Public Static Attributes Documentation¶
variable kFileDurationSamps¶
variable kStartupDelayMs¶
variable kTargetSr¶
variable kTransferSize¶
Public Functions Documentation¶
function AudioCallback¶
function main¶
The documentation for this class was generated from the following file external-docs/libDaisy/examples/WavWriter_Realtime/main.cpp