master
Mark 2022-06-26 12:49:50 -07:00
parent 5ea64d3e07
commit dacb8d820d
Signed by: Mark
GPG Key ID: AD62BB059C2AAEE4
1 changed files with 22 additions and 17 deletions

View File

@ -44,7 +44,25 @@ const size_t height = 150;
int main(int argc, char *argv[]) {
uint8_t hid_buf[20];
// buffer size for waveform:
// (44100 / fps * 10), make 10 bigger for slower scrolling
//
// Double both buffer sizes if stereo
// FFT generator
FFT_Visualizer fft = FFT_Visualizer(
width, height,
100, 10000
);
// Audio buffer
Buffer buf = Buffer(
"/tmp/mpd.fifo",
44100 / 2, // Keep 500ms of data in buffer
fft.compute_buffer_output_size()
);
// HID interface wrapper
Ergodox Dox = Ergodox::init(
0x3297,
0x4976,
@ -52,22 +70,8 @@ int main(int argc, char *argv[]) {
0xFF60
);
// buffer size for waveform:
// (44100 / fps * 10), make 10 bigger for slower scrolling
//
// Double both buffer sizes if stereo
FFT_Visualizer fft = FFT_Visualizer(
width, height,
100, 10000
);
Buffer buf = Buffer(
"/tmp/mpd.fifo",
//"/home/mark/Workbench/sospi/pulse.fifo",
44100 / 2, // Keep 500ms of data in buffer
fft.compute_buffer_output_size()
);
// Data buffer
uint8_t hid_buf[12];
while (1) {
@ -85,5 +89,6 @@ int main(int argc, char *argv[]) {
Dox.write(hid_buf, 12);
}
return 0;
}