summaryrefslogtreecommitdiffstats
path: root/src/sound.c
diff options
context:
space:
mode:
authorgrm <grm@eyesin.space>2025-02-22 03:40:43 +0200
committergrm <grm@eyesin.space>2025-02-22 03:40:43 +0200
commit35208c579c9e7d0078d786e61f4a323919e2dcdf (patch)
tree022f464e6350c18f76443a6e96eccd02698df7d1 /src/sound.c
parent500b9a07b93d6cd3e771edc5698e06d163da60f1 (diff)
downloadsynth-project-35208c579c9e7d0078d786e61f4a323919e2dcdf.tar.gz
synth-project-35208c579c9e7d0078d786e61f4a323919e2dcdf.tar.bz2
synth-project-35208c579c9e7d0078d786e61f4a323919e2dcdf.zip
Small fixesHEADmaster
Diffstat (limited to 'src/sound.c')
-rw-r--r--src/sound.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/sound.c b/src/sound.c
index 04b3f9b..9cdb75e 100644
--- a/src/sound.c
+++ b/src/sound.c
@@ -1,5 +1,8 @@
#include "sound.h"
#include <portaudio.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
static void
@@ -65,13 +68,14 @@ init_sound(synth_t * synth, PaStreamCallback *streamCallback, const int device_i
if (deviceInfo->maxOutputChannels == 0) {
continue;
}
- //if (!strcmp("HyperX Cloud II Wireless: USB Audio (hw:2,0)", deviceInfo->name)) break;
- printf("dev: %s || %f || %d channels\n", deviceInfo->name, deviceInfo->defaultSampleRate, deviceInfo->maxOutputChannels);
- //if (!strcmp("HDA Intel PCH: ALC1220 Analog (hw:0,0)", deviceInfo->name)) break;
+ printf("dev: %s || %f || id:%d out:%d || lil:%f lol:%f\n", deviceInfo->name,
+ deviceInfo->defaultSampleRate, deviceInfo->maxInputChannels,
+ deviceInfo->maxOutputChannels, deviceInfo->defaultLowInputLatency,
+ deviceInfo->defaultLowOutputLatency);
+
if (c == device_id) break;
c++;
}
-
PaStreamParameters outputParameters;
outputParameters.device = i; Pa_GetDefaultOutputDevice(); /* default output device */
@@ -94,7 +98,7 @@ init_sound(synth_t * synth, PaStreamCallback *streamCallback, const int device_i
if (err != paNoError) {
printf("Error opening stream with %s!!!!!", Pa_GetDeviceInfo(outputParameters.device)->name);
}
-
+
Pa_SetStreamFinishedCallback(synth->stream, &StreamFinished);
Pa_StartStream(synth->stream);