On 2010/12/14 03:05, Greg Ward <g...@gerg.ca> wrote:
> Before I dump the patch on you, here's what I understand about audio on OS X:
> 
>   * you can choose to open the default device, or the system device,
> or the "AUHAL" (audio unit hardware abstraction layer) device
>   * the default device is where the user has specified that most audio
> should go (under System Preferences > Sound)
>   * the system device is where system bleeps and pings go (usually
> it's the default device, but the user can choose a different device)
>   * AUHAL lets you specify a device by device ID
>   * device ID is an opaque int, meaningless to end users
>   * audio devices also have a UID (readable but quite long and hard to
> discover) and a name (which is what you see in the System Preferences
> GUI)
> 
> Thus, I chose to use the audio device name as the configuration setting in 
> mpd.
> 
> The other choice I made was for mpd config to mirror the system API:
> either you set
> 
>   devicetype "default"        # or "system"
> 
> and devicename is ignored, or you set
> 
>   devicetype "hal"
>   devicename <something you see in the System Preferences GUI>
> 
> It would be silly to set devicetype "hal" and not specify devicename.
> Conversely, supplying devicename with devicetype "default" or "system"
> is pointless.
> 
> This is obviously not the only way to do things.  I'm open to
> feedback.

Hi Greg,

that looks like a useful approach, great work!

Obviously, osx_output_configure() is not finished yet (and devicetype
isn't used yet).

> +     const char *devicetype; /* "default", "system", or "hal" */

The variable "devicetype" should be an enum, parsed in
osx_output_configure().  I'm not so sure if "devicetype" is a good
idea, because it requires the user to configure two settings, but
maybe that's just the way to go on OS X?  Would it be possible to let
the plugin recognize the device type from the configured name?

> +             g_set_error(error, osx_output_quark(), 0,
> +                         "Unable to determine number of OS X audio devices: 
> %s",
> +                         GetMacOSStatusCommentString(status));

Could be useful to pass "status" instead of "0" here.  That error code
isn't used anywhere, and the rest of the plugin doesn't do it either,
but it might be useful in the future.

I'd say: finish your patch, and I'll merge it.

Max

------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________
Musicpd-dev-team mailing list
Musicpd-dev-team@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team

Reply via email to