[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Mixer Master Volume

Posted on 1997-05-12
2
Medium Priority
?
901 Views
Last Modified: 2013-12-04
I need to control the WIN95 Mixer's  Master Volume.
Using the mixer, I can control the Volumes and Balances of  the CD Player, WAV, MIDI, MIC and PC Speaker lines. I do this by using mixerGetLineInfo(), mixerGetLineControls(), mixerGetControlDetails() and mixerSetControlDetails().  This Works !!!!!       However, How is the Master Volume Controlled?
0
Comment
Question by:jowen051297
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 23

Accepted Solution

by:
chensu earned 100 total points
ID: 1397284
The following code is to get the control ID of the Master Volume.
        // get dwLineID
      MIXERLINE mxl;
      mxl.cbStruct = sizeof(MIXERLINE);
      mxl.dwComponentType = MIXERLINE_COMPONENTTYPE_DST_SPEAKERS;
      if (::mixerGetLineInfo((HMIXEROBJ)m_hMixer,
                               &mxl,
                                     MIXER_OBJECTF_HMIXER |
                                     MIXER_GETLINEINFOF_COMPONENTTYPE)
            != MMSYSERR_NOERROR)
            return FALSE;

      // get dwControlID
      MIXERCONTROL mxc;
      MIXERLINECONTROLS mxlc;
      mxlc.cbStruct = sizeof(MIXERLINECONTROLS);
      mxlc.dwLineID = mxl.dwLineID;
      mxlc.dwControlType = MIXERCONTROL_CONTROLTYPE_VOLUME;
      mxlc.cControls = 1;
      mxlc.cbmxctrl = sizeof(MIXERCONTROL);
      mxlc.pamxctrl = &mxc;
      if (::mixerGetLineControls((HMIXEROBJ)m_hMixer,
                                   &mxlc,
                                           MIXER_OBJECTF_HMIXER |
                                           MIXER_GETLINECONTROLSF_ONEBYTYPE)
          != MMSYSERR_NOERROR)
            return FALSE;

Then you can call mixerGetControlDetails() and mixerSetControlDetails() with the control ID.

0
 

Author Comment

by:jowen051297
ID: 1397285
Excellent answer from chensu.  It was clear, concise and worked beautifully. Thanks.
0

Featured Post

Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question