On Wednesday 28 March 2012 04:43:54 pm Ken Thomases wrote: > On Mar 27, 2012, at 11:04 AM, Andrew Eikum wrote: > > I added a prefix to each MMDevice indicating its flow direction. > > > > This solves the Rosetta Stone issue, as you can see in the bug. But > > when testing this in other applications, it quickly becomes silly. > > Audacity 1.3 adds its own "Out: " prefix to WinMM device names, > > creating "Out: Out: default" in the UI. > > Meh. I don't think that's a particularly troublesome side effect. If no > better solution presents itself, then I say this is the least bad of the > alternatives. > > That said... > > > The unique identifier must be a prefix, as WinMM's szPname field > > truncates at 31 characters. > > Is it really likely that identifiers will not leave any characters to > spare? Anyway, since WinMM is already arbitrarily truncating them, you can > truncate them even earlier at 29 characters and suffix with as much of " > output" or " input" as will fit. > > Another approach is to prefix but using an obscure "code" which won't look > silly when applications also prefix the device name. For example, the ALSA > driver might use "WAO" and "WAI" (for "Wine ALSA Output" and "Wine ALSA > Input", respectively) or whatever. These codes will be inscrutable, but > not obviously redundant with an application-provided "Out: " prefix. And > users are already somewhat used to inscrutable terms in device names (for > example, "HDA" meant nothing to me until I looked it up). > > Regards, > Ken
Maybe add some extra checks like: - If it's input and it doesn't already contain (case insensitive) "input" or "capture" or "microphone" append " Input" (as much as it fits in buffer) - If it's output and it doesn't already contain (case insensitive) "output" or "playback" or "speaker" append " Output" (as much as it fits in buffer) Paul
