🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.multimedia
2 messages
2 total messages Started by George Nemeth Fri, 07 Mar 2003 15:20
Mixer problem
#867
Author: George Nemeth
Date: Fri, 07 Mar 2003 15:20
31 lines
2198 bytes
I am having problems with the mixer devices under win98. The following 
code works fine with win95 and nt4, but the call to

auxGetNumDevs() returns 0 all the time when run under win98.  We tried several machines with the same result. Can anyone shed an light on why, OR suggest a different method of controlling the mixer.  We simply need to lower the line in audio level, play a wav and then restore the line in back to the level it was previously at. 

int TStation::GetLineInDevice()
{
  //return # that identifies line in dev in aux dev list
  AUXCAPS auxcaps;
  int nDevId;
  int nNbrAuxDevices = auxGetNumDevs();  //<--always returns zero under win98
  int rc;
  bool found = false;

  for(nDevId = 0; nDevId < nNbrAuxDevices; nDevId++) {
    rc = auxGetDevCaps(nDevId, &auxcaps, sizeof(auxcaps));
    if(rc == MMSYSERR_NOERROR &&
       (auxcaps.wTechnology & AUXCAPS_AUXIN) &&
       (auxcaps.dwSupport & AUXCAPS_VOLUME)) {
      ShowMessage("Got Aux In");
      found = true;
      break;
    }
  }

  if(found) {
    return nDevId;
  } else {
    return -1;
  }
}
Re: Mixer problem
#868
Author: Maynard Philbrook
Date: Fri, 07 Mar 2003 16:34
40 lines
2465 bytes
That isn't a 98 constraint.
 that is the sound card drivers that happen to be installed.
 Aux devices are not very common any more..
 most of the time they only support the simple things like master volume etc..
if that..


George Nemeth wrote:

> I am having problems with the mixer devices under win98. The following
> code works fine with win95 and nt4, but the call to
>
> auxGetNumDevs() returns 0 all the time when run under win98.  We tried several machines with the same result. Can anyone shed an light on why, OR suggest a different method of controlling the mixer.  We simply need to lower the line in audio level, play a wav and then restore the line in back to the level it was previously at.
>
> int TStation::GetLineInDevice()
> {
>   //return # that identifies line in dev in aux dev list
>   AUXCAPS auxcaps;
>   int nDevId;
>   int nNbrAuxDevices = auxGetNumDevs();  //<--always returns zero under win98
>   int rc;
>   bool found = false;
>
>   for(nDevId = 0; nDevId < nNbrAuxDevices; nDevId++) {
>     rc = auxGetDevCaps(nDevId, &auxcaps, sizeof(auxcaps));
>     if(rc == MMSYSERR_NOERROR &&
>        (auxcaps.wTechnology & AUXCAPS_AUXIN) &&
>        (auxcaps.dwSupport & AUXCAPS_VOLUME)) {
>       ShowMessage("Got Aux In");
>       found = true;
>       break;
>     }
>   }
>
>   if(found) {
>     return nDevId;
>   } else {
>     return -1;
>   }
> }
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads