diff options
Diffstat (limited to 'src/sound.c')
-rw-r--r-- | src/sound.c | 14 |
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); |