From 6a439dffb96ddf1ae31441be87f42402bcdad711 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Thu, 30 Jul 2015 10:46:25 -0700 Subject: [PATCH] document device pairs --- README.md | 2 -- src/soundio.h | 4 ++++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 51c855e..4c84e43 100644 --- a/README.md +++ b/README.md @@ -249,8 +249,6 @@ view `coverage/index.html` in a browser. 0. Verify that JACK xrun callback context is the same as process callback. If not, might need to hav xrun callback set a flag and have process callback call the underflow callback. - 0. API: devices should reference to their "other" device when the same - hardware has input and output. This is important due to clock timing. 0. Detect PulseAudio server going offline and emit `on_backend_disconnect`. 0. Instead fo open(), start(), pause(), open() starts it and it starts paused. 0. Create a test for underflow handling. It just makes a sine wave for 5 diff --git a/src/soundio.h b/src/soundio.h index 3fd3dbe..6a310bf 100644 --- a/src/soundio.h +++ b/src/soundio.h @@ -246,6 +246,10 @@ struct SoundIoDevice { // `id` is a string of bytes that uniquely identifies this device. // `name` is user-friendly UTF-8 encoded text to describe the device. + // If the same physical device supports both input and output, that makes + // one SoundIoDevice for the input and one SoundIoDevice for the output. + // In this case, the `id` of each SoundIoDevice will be the same, and the + // `aim` field will be different. char *id; char *name;