On Wed, Dec 15, 2010 at 4:49 AM, Max Kellermann <m...@duempel.org> wrote:
> 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().

Actually, Apple already provides the required type and constants.  The
current version of my patch uses them.  Coming up shortly, as soon as
I re-learn enough git to be useful.  ;-)

> 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?

That was pretty much the same point that Denis Krjuchkov had.
Basically I'm exposing a detail the OS X Core Audio API in mpd.conf,
which is probably unnecessary.  Proposal: drop devicetype and
devicename in favour of one optional config parameter, 'device'.  If
you don't supply it, e.g.

audio_output {
    type "osx"
    name "default"
}

then mpd opens the default audio device, same as it does now.  But if
you want to open the device whose name is "stereo-link 1200 USB DAC":

audio_output {
    type "osx"
    name "stereo-link"
    device "stereo-link 1200 USB DAC"
}

Two special cases: device "default" would open the default device, not
a device whose name is "default".  (The built-in audio hardware, at
least on my G4 PowerBook, is named "Built-in Audio".)  And "system"
would open the system device, not a device whose name is "system".
The system device is where system bleeps go -- usually it's the same
as the default device, but the user has control.  And the API exposes
this knob.

Obvious flaw: if some bonehead hardware manufacturer releases a fancy
new whizz-bang sound card whose name as seen by OS X is "default" or
"system", mpd will be unable to open that device.

Alternately, don't have an explicit way to open the default device.
If you don't supply 'device', after all, mpd will open the default
device.  And don't bother giving the user the ability to open the
system device.  Seems rather arcane to me.

I'll see if I can send a revised patch later tonight.  Is this one
small enough that emailing the list is OK?

Greg

------------------------------------------------------------------------------
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