Little Lost APIs

When you have an API set as large as the Win32 API set, sometimes APIs get "lost".  Either by forgetfulness, or by the evolution of the hardware platform.

We've got one such set of APIs here in multimedia-land, they're the "aux" APIs.

The "aux" APIs (auxGetNumDevs, auxGetDevCaps, auxGetVolume, auxSetVolume, and auxOutMessage) are intended to control the volume of the "aux" port on your audio adapter.

It's a measure of how little used these are that when I asked around my group what the aux APIs did, the general consensus was "I don't know" (this isn't exactly true, but it's close).  We certainly don't know of any applications that actually uses these APIs.

And that's not really surprising since the AUX APIs are used to control the volume of either the AUX input jack on your sound card or the output volume from a CDROM drive (if connected via the analog cable).

What's that you say? Your sound card doesn't have an "AUX" jack?  That's not surprising, I'm not sure that ANY sound card has been manufactured in the past 10 years with an AUX input jack (they typically have a "LINE-IN" jack and a "MIC" jack).  And for at least the past 5 years, hardware manufacturers haven't been connecting the analog CD cable to the sound card (it enables them to save on manufacturing costs).

Since almost every PC system shipped in the past many years (at least 5) has used digital audio extraction to retrieve the CD audio, the analog cable's simply not needed on most systems (there are some exceptions such as laptop machines, which use the analog connector to save battery life when playing back CD audio).  And even if a sound card were to add an AUX input, the "mixer" APIs provide a more flexable mechanism for managing those APIs anyway.

So with the "aux" APIs, you have a set of APIs that were designed to support a series of technologies that are at this point essentially obsolete.  And even if your hardware used them, there's an alternate, more reliable set of APIs that provide the same functionality - the mixer APIs.  In fact, if you launch sndvol32.exe (the volume control applet), you can see a bunch of sliders to the right of the volume control - they're labeled things like "wave", "sw synth", "Line in", etc.  If your audio card has an "AUX" line, then you'll see an "Aux" volume control - that's the same control that the auxSetVolume and auxGetVolume API controls.  Similarly, there's likely to be a "CD Player" volume control - that's the volume for the CD-ROM control (and it works for both digital and analog CD audio).  So all the "aux" API functionality is available from the "mixer" APIs, but the mixer version works in more situations.

But even so, the "aux" APIs still exist in the system in the event that someone might still be calling them...  Even if there's no hardware on the system which would be controlled by these APIs, they still exist.

These APIs are one of the few examples of APIs where it's actually possible that we might be able to end-of-life the APIs - they'll never be removed from the system, but a time might come in the future where the APIs simply stop working (auxGetNumDevs will return 0 in that case indicating that there are no AUX devices on the system).

Edit: Clarified mixer and aux API relationship a bit to explain how older systems would continue to work.

Comments

  • Anonymous
    April 06, 2005
    Hm, most sound cards I've seen recently do have aux pinheads on the card (or on the mobo), and I generally try to wire them. My current mobo even has two, one wired to a CD-ROM drive, the other to a DVD-ROM. (I do not, however, use them.)

    Sadly, I haven't seen a cable with a male 1/8th inch on one end, and a female 4-pin audio connector on the other recently; such a thing would be useful for wiring my TV card.

  • Anonymous
    April 06, 2005
    James,
    I'd check to be sure - are you SURE it's an AUX connector? As I said, I'm not aware of any current audio cards with an AUX connector. Certainly the SB Live in my test machine and the AC97 in my dev machine and test machine don't have them, neither do most (all?) of the HDAUDIO machine's I've got access to.

  • Anonymous
    April 06, 2005
    Hey, you can't obsolete the Aux API's! (Just kidding).

    I actually did write a program a long time ago that used this API (CD Control Centre, using these calls to do a fade-in/fade-out of tracks, and provide a software volume control). I know of 1 person still using it on a Win98 platform, but haven't looked at it in a LONG time (it was written in VB2.0 [yes, 16-bit]).

  • Anonymous
    April 06, 2005
    EOLing APIs is tricky bussiness. Once you do, you'll find that some media player doesn't work, and that Media Player is thr default in PCs by the largest PC OEM in China or something, and you once again get charged of using the MS monopoly to push Media Player, etc etc...

  • Anonymous
    April 06, 2005
    Jonathan,
    You're right. The reason that this particular set of APIs might be ok is simply because they don't work on the vast majority of machines today. So any application that depends on them working isn't working on the vast majority of machines today.

    If it was anything different, we'd not be able to do this. It's as if we had an API to access 5 1/4" floppy drives - they just don't exist nowadays, so it'd be safe to make the API stop working at some point. This isn't the case for the vast majority of Windows APIs because those APIs aren't tied to a particular hardware implementation.

  • Anonymous
    April 06, 2005
    You've just scared me by making me work out how old my main workstation is -- I think it turns 7 in June. I know the CD-ROM is hooked up with an analogue cable, to one of three 4-pin sockets on the card (CD-ROM, PHONE and AUX if memory serves). My old SoundBlaster 16 (clone?) had an AUX connector which I broke out to a pair of phono/RCA jacks on a blanking plate -- came in very useful at times. Shame they've fallen out of use, but I suppose if I really needed one I could pick up a decent external soundcard quite cheaply. How times change...

  • Anonymous
    April 06, 2005
    The comment has been removed

  • Anonymous
    April 06, 2005
    The comment has been removed

  • Anonymous
    April 06, 2005
    Fascinating. I'm not sure why the aux APIs exist, and neither does anyone currently working on audio (I asked the same question).

    And mixerOpen doesn't depend on this (unless you specify MIXER_OBJECTF_AUX for the open).

    I just checked the code in sndvol - you're right, it turns out that sndvol32.exe was written to operate in two separate modes - one where it used the mixer APIs the other where it didn't (there was at one point apparently UI to switch between the two). The non mixer code path is dead code however - it can't be enabled.

  • Anonymous
    April 06, 2005
    Larry,

    The odd thing is, I'm not sure if that particular SB-16 was actually a real card or some sort of clone -- it had Creative markings on the chips, including the optional ASP, but the board didn't bear any SoundBlaster markings and the manual made no reference to the company. It might have been OEM, but it always puzzled me.

    The genuine SB-16 I have (or had -- there's a 3Com EtherLink II on my desk where I thought I had the soundcard!) somewhere around here didn't have an AUX connector; if I get a moment in the office tomorrow I'll fire up the machine that hosted the other card and find out what inputs it offered.

  • Anonymous
    April 06, 2005
    I have a sound blaster 512 pci that has 3 (cd/aux/tv) connectors on the board. My recently purchased Asus mb has CD/Aux on board too.

  • Anonymous
    April 06, 2005
    Larry I'm a big fan of your blog, but I dont post too often. I almost always learn something new or old when I your posts.
    But there is something very harsh on my eyes with your new page style. Can we have a slightly darker background or a larger for font?

  • Anonymous
    April 06, 2005
    Larry I'm a big fan of your blog, but I dont post too often. I almost always learn something new or old when I your posts.
    But there is something very harsh on my eyes with your new page style. Can we have a slightly darker background or a larger for font?

  • Anonymous
    April 06, 2005
    Larry I'm a big fan of your blog, but I dont post too often. I almost always learn something new or old when I your posts.
    But there is something very harsh on my eyes with your new page style. Can we have a slightly darker background or a larger for font?

  • Anonymous
    April 06, 2005
    Is this better? I've bumped the font size a bit, and the background should be a smidge darker.

    I think I may need to learn CSS to tweak this the way I like it - I like the style overall, but it lacks contrast to my eyes.

  • Anonymous
    April 06, 2005
    The comment has been removed

  • Anonymous
    April 06, 2005
    The comment has been removed

  • Anonymous
    April 06, 2005
    Would you consider RDO and DAO as part of that list?

  • Anonymous
    April 06, 2005
    > It's as if we had an API to access 5 1/4"
    > floppy drives - they just don't exist
    > nowadays, so it'd be safe to make the API
    > stop working at some point.

    More precisely: they just don't exist on any PC powerful enough to run Windows XP or 2003, so it'd be safe to make the API stop working in these and later OSes.

    Even more precisely: they aren't built-in on any PC powerful enough to run Windows XP or 2003, but they could be attached via SCSI cables, so it still wouldn't be safe to make the API stop working.

    Details: last month I saw a computer actually still in use in an industrial environment with a 5.25-inch floppy drive built in, and a few months earlier I considered buying an external SCSI floppy drive just for laughs (I didn't buy it but someone else did).

  • Anonymous
    April 06, 2005
    Larry,
    regarding your new style, which I like by the way, you could always do a bunch of alternate style sheets and allow people to pick and choose their favorites.

    http://www.alistapart.com/articles/alternate/.

  • Anonymous
    April 06, 2005
    Nice article; I like these since I can follow them, while I get lost in the ones which actually try and make Windows do stuff. :-)

    (As an aside, I quite like the current style you're using. Don't suppose you can convince Mr Chen to switch to something similar...?)

  • Anonymous
    April 07, 2005
    Wound: Unfortunately, the Community Server software we use doesn't allow for user-specified CSS :(.

    I'm still tweaking the CSS (and learning CSS in the process). Raymond's given me some really useful hints on how to go about it so we'll see what happens.

  • Anonymous
    April 07, 2005
    "But there is something very harsh on my eyes with your new page style. Can we have a slightly darker background or a larger for font? "

    If you have a scroll wheel (and are using MSIE 6), try holding down the control button and scrolling the wheel. Text can be enlarged and shrunk this way.

  • Anonymous
    April 07, 2005
    The comment has been removed

  • Anonymous
    April 07, 2005
    Adrian,
    Who said anything about floppies being obsolete? I said 5 1/4" floppies. 3 1/2" floppies are still around, but 5 1/4" floppies haven't been made for PC's in at least 10 (maybe 15) years. The 5 1/4" floppy (1.2M floppies) went out when IBM introduced the PS/2 machine with 1.4M floppy drives back in 1987.

  • Anonymous
    April 07, 2005
    The comment has been removed

  • Anonymous
    April 07, 2005
    Oh, and nice Asimov ref on the title!

  • Anonymous
    April 11, 2005
    At least one person has used a 5.25" drive with XP:
    http://groups-beta.google.com/group/alt.os.windows-xp/msg/6d786fc9841e58ae
    Does XP still support 4 floppy drives like NT and Win2000 do?

  • Anonymous
    April 14, 2005
    The comment has been removed

  • Anonymous
    May 30, 2009
    PingBack from http://outdoorceilingfansite.info/story.php?id=2851

  • Anonymous
    May 31, 2009
    PingBack from http://woodtvstand.info/story.php?id=8664

  • Anonymous
    June 02, 2009
    PingBack from http://woodtvstand.info/story.php?id=49852