chiark
/
gitweb
/
~mdw
/
disorder
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lib/configuration.c, lib/home.c: Introduce environment variables.
[disorder]
/
lib
/
coreaudio.c
diff --git
a/lib/coreaudio.c
b/lib/coreaudio.c
index 6231877cdf474615c6ebb98f70b30f867fad3e71..aafab8612b6f71209102a900170f971993d5ccbc 100644
(file)
--- a/
lib/coreaudio.c
+++ b/
lib/coreaudio.c
@@
-16,7
+16,7
@@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/** @file lib/coreaudio.c
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/** @file lib/coreaudio.c
- * @brief Support for
@ref BACKEND_COREAUDIO
+ * @brief Support for
Apple Core Audio
*/
#include "common.h"
*/
#include "common.h"
@@
-41,10
+41,7
@@
void coreaudio_fatal(OSStatus err, const char *fmt, ...) {
byte_vasprintf(&msg, fmt, ap);
va_end(ap);
byte_vasprintf(&msg, fmt, ap);
va_end(ap);
- disorder_fatal(0, "%s: error %d (%s, %s)",
- msg, (int)err,
- GetMacOSStatusErrorString(err),
- GetMacOSStatusCommentString(err));
+ disorder_fatal(0, "%s: error %u", msg, (unsigned)err);
}
/** @brief Return the default device ID */
}
/** @brief Return the default device ID */
@@
-68,9
+65,9
@@
static AudioDeviceID coreaudio_use_default(void) {
/** @brief Find a device by some string
* @param selector Selector for property to look for
/** @brief Find a device by some string
* @param selector Selector for property to look for
- * @param description Property description
* @param devs List of device IDs
* @param ndevs Number of device IDs in @p devs
* @param devs List of device IDs
* @param ndevs Number of device IDs in @p devs
+ * @param dev Desired device name
* @param resultp Where to put device ID
* @return 1 if found, 0 if not found
*/
* @param resultp Where to put device ID
* @return 1 if found, 0 if not found
*/
@@
-99,7
+96,7
@@
static int coreaudio_find_device(AudioObjectPropertySelector selector,
'?', FALSE, output, sizeof output,
&used);
output[used] = 0;
'?', FALSE, output, sizeof output,
&used);
output[used] = 0;
- info("device %u %s: %s", n, description, (char *)output);
+
disorder_
info("device %u %s: %s", n, description, (char *)output);
#endif
if(CFStringCompare(dev, name,
kCFCompareCaseInsensitive|kCFCompareNonliteral)
#endif
if(CFStringCompare(dev, name,
kCFCompareCaseInsensitive|kCFCompareNonliteral)
@@
-147,7
+144,7
@@
AudioDeviceID coreaudio_getdevice(const char *name) {
if(!ndevs)
disorder_fatal(0, "no sound devices found");
/* Try looking up by UID first */
if(!ndevs)
disorder_fatal(0, "no sound devices found");
/* Try looking up by UID first */
- found = coreaudio_find_device(kAudioDevicePropertyDeviceUID, //"UID",
+ found = coreaudio_find_device(
-1*
kAudioDevicePropertyDeviceUID, //"UID",
devs, ndevs, dev, &adid);
/* Failing that try looking up by name */
if(!found)
devs, ndevs, dev, &adid);
/* Failing that try looking up by name */
if(!found)