Bandplan system

This commit is contained in:
Ryzerth
2020-08-04 21:34:56 +02:00
parent cd7e5cf1bc
commit 022898c61d
155 changed files with 49138 additions and 107 deletions

View File

@@ -4,6 +4,7 @@
#include <dsp/types.h>
#include <fstream>
#include <portaudio.h>
#include <spdlog/spdlog.h>
namespace io {
class AudioSink {
@@ -40,9 +41,16 @@ namespace io {
outputParams.device = Pa_GetDefaultOutputDevice();
outputParams.suggestedLatency = Pa_GetDeviceInfo(outputParams.device)->defaultLowOutputLatency;
PaError err = Pa_OpenStream(&stream, NULL, &outputParams, 48000.0f, _bufferSize, paClipOff, _callback, this);
printf("%s\n", Pa_GetErrorText(err));
if (err != 0) {
spdlog::error("Error while opening audio stream: ({0}) => {1}", err, Pa_GetErrorText(err));
return;
}
err = Pa_StartStream(stream);
printf("%s\n", Pa_GetErrorText(err));
if (err != 0) {
spdlog::error("Error while starting audio stream: ({0}) => {1}", err, Pa_GetErrorText(err));
return;
}
spdlog::info("Audio device open.");
}
void stop() {