[wdmaudiodev] Re: waveOutSetVolume() under Vista returns MMSYSERR_NOTSUPPORTED

  • From: Sam Tertzakian <sam@xxxxxxxxxxx>
  • To: wdmaudiodev@xxxxxxxxxxxxx
  • Date: Thu, 9 Mar 2006 15:44:39 -0800 (PST)

Here is my situation:

On build 5326:

The mixer API is working with the onboard audio
driver...but not my driver. In driver I receive
MMSYSERR_ERROR.
The wave API seems not to be working on either driver.
I receive MMSYSERR_NOTSUPPORTED.

But, in neither case does any volume slider in the UI
move.

So, I think we have three separate issues:

1. Why does Mixer API fail for my driver but not
onboard audio driver. (Even though it does work under
XP).
2. Why does wave API fail for both drivers? (Even
though it does work under XP).
3. How can I control the volume slider in the UI (is
it even possible, and if not, should it be for our
case)?

--- Sam Tertzakian <sam@xxxxxxxxxxx> wrote:

> Hi, 
> 
>  
> 
> I have a device with a volume control. And I wrote a
> driver and service for
> the device. (The service is necessary to fulfill
> some of the requirements.)
> 
>  
> 
> Now, when the user changes the volume on the device,
> the service actually
> ends up getting the volume setting on the device
> (not the driver). What we
> want is for the service to change the volume in a
> way that the Hardware
> Volume slider in the Windows UI changes to match the
> volume on the device.
> (This should be a Device volume, not a per-Stream
> Volume). 
> 
>  
> 
> Right now, the service is changing the volume in the
> driver by communicating
> directly with the driver.That works. (But, the
> Volume Slider in the UI does
> not change. That is the main problem.) 
> 
>  
> 
> The driver exports KsMethods to allow the Service to
> change the volume in
> the Driver.but the UI does not seem to adjust the
> volume slider.
> 
>  
> 
> Perhaps the problem is that somehow the driver is
> not exporting the volume
> control in a way that the slider changes.
> 
>   _____  
> 
> From: wdmaudiodev-bounce@xxxxxxxxxxxxx
> [mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf
> Of Frank Yerrace
> Sent: Thursday, March 09, 2006 5:11 AM
> To: wdmaudiodev@xxxxxxxxxxxxx
> Subject: [wdmaudiodev] Re: waveOutSetVolume() under
> Vista returns
> MMSYSERR_NOTSUPPORTED
> 
>  
> 
> I'm sorry it's still not entirely clear to me what
> your scenario is. Does
> your solution have some physical buttons, and are
> you trying to write a
> sort-of daemon that responds to those buttons by
> changing the main volume
> level? Are you writing a program that has a GUI with
> a volume slider, and
> you want that slider to affect the main volume
> level? Are you writing a
> control panel extension for Vista's Audio control
> panel?
> 
>  
> 
> As Larry said, the wave and mixer APIs on Vista now
> affect only the calling
> application rather than the main volume level. In
> general we feel that there
> is rarely a need for software to affect the main
> volume level. Instead, it
> is directly an end user function. If we can
> understand your larger scenario
> hopefully we can give you better guidance on how to
> achieve what you want to
> do.
> 
>  
> 
> Thanks!
> 
>  
> 
> Frank Yerrace
> 
> Technical Lead
> 
> Microsoft Corporation
> 
>  
> 
> This posting is provided "AS IS" with no warranties,
> and confers no rights.
> 
>  
> 
>   _____  
> 
> From: wdmaudiodev-bounce@xxxxxxxxxxxxx
> [mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf
> Of Sam Tertzakian
> Sent: Wednesday, March 08, 2006 9:10 PM
> To: wdmaudiodev@xxxxxxxxxxxxx
> Subject: [wdmaudiodev] Re: waveOutSetVolume() under
> Vista returns
> MMSYSERR_NOTSUPPORTED
> 
>  
> 
> Yes, the main volume UI to uses the Hardware Volume
> Control (we don't see a
> problem there). 
> 
>  
> 
> For this reason, we are trying to access the
> Hardware Volume Control. That
> is why we are trying use either Wave or Mixer APIs
> to access the Hardware
> Volume Control. But, it seems that we cannot access
> that control under Vista
> (only XP) using Mixer or Wave APIs.
> 
>  
> 
>   _____  
> 
> From: wdmaudiodev-bounce@xxxxxxxxxxxxx
> [mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf
> Of Frank Yerrace
> Sent: Wednesday, March 08, 2006 6:27 PM
> To: wdmaudiodev@xxxxxxxxxxxxx
> Subject: [wdmaudiodev] Re: waveOutSetVolume() under
> Vista returns
> MMSYSERR_NOTSUPPORTED
> 
>  
> 
> Which user control are you talking about? The main
> volume UI in Vista will
> already use your hardware volume control (unless
> there's a bug in the way
> somewhere).
> 
>  
> 
> Frank Yerrace
> 
> Technical Lead
> 
> Microsoft Corporation
> 
>  
> 
> This posting is provided "AS IS" with no warranties,
> and confers no rights.
> 
>  
> 
>   _____  
> 
> From: wdmaudiodev-bounce@xxxxxxxxxxxxx
> [mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf
> Of Sam Tertzakian
> Sent: Wednesday, March 08, 2006 6:24 PM
> To: wdmaudiodev@xxxxxxxxxxxxx
> Subject: [wdmaudiodev] Re: waveOutSetVolume() under
> Vista returns
> MMSYSERR_NOTSUPPORTED
> 
>  
> 
> My device has a volume control on it. When the user
> moves the control up and
> down, we need the volume slider on the "Master
> Volume" to move up and down.
> 
>  
> 
> How do you think I should do this?
> 
>  
> 
> I have not tried the Mixer API on the Feb CTP, so I
> don't' know if it
> works.but, I did try waveOutSetVolume().and for my
> driver (and for the
> on-board audio device for which I did not write a
> driver) it seems to not
> work. (But it does work under XP.)
> 
>  
> 
>  
> 
>   _____  
> 
> From: wdmaudiodev-bounce@xxxxxxxxxxxxx
> [mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf
> Of Larry Osterman
> Sent: Wednesday, March 08, 2006 5:57 PM
> To: 'wdmaudiodev@xxxxxxxxxxxxx'
> Subject: [wdmaudiodev] Re: waveOutSetVolume() under
> Vista returns
> MMSYSERR_NOTSUPPORTED
> 
>  
> 
> Both waveOutSetVolume and the mixer APIs should be
> working on any recent
> builds (with the caveat that Frank mentioned below:
> waveOutSetVolume using
> IDs didn't work in all cases until recently).
> 
>  
> 
> If you attempt to set the capture volume using the
> mixer APIs, it won't work
> (the API call should succeed, but the call will be
> ignored), the bug fix for
> this didn't make the Feb CTP.
> 
>  
> 
> Please note that the wave and mixer volumes are
> plumbed to the per-stream
> volume for render endpoints.
> 
>  
> 
>  
> 
> Larry Osterman 
> 
>   _____  
> 
> From: wdmaudiodev-bounce@xxxxxxxxxxxxx
> [mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf
> Of Sam Tertzakian
> Sent: Wednesday, March 08, 2006 5:42 PM
> To: wdmaudiodev@xxxxxxxxxxxxx
> Subject: [wdmaudiodev] Re: waveOutSetVolume() under
> Vista returns
> MMSYSERR_NOTSUPPORTED
> 
>  
> 
> I have tried both handles and ids..But, I just
> realized that I am testing
> the Mixer API implementation on  build 5270 and not
> the latest build. I know
> that both wave handles and device ids fail under the
> later version of Vista.
> 
> 
>  
> 
> But, I am not sure about the mixer api under the
> lastest version of Vista.
> I'll try it.
> 
>  
> 
>   _____  
> 
> From: wdmaudiodev-bounce@xxxxxxxxxxxxx
> [mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf
> Of Frank Yerrace
> Sent: Wednesday, March 08, 2006 5:33 PM
> To: wdmaudiodev@xxxxxxxxxxxxx
> Subject: [wdmaudiodev] Re: waveOutSetVolume() under
> Vista returns
> MMSYSERR_NOTSUPPORTED
> 
>  
> 
> Are you using wave handles or wave IDs? Both will
> eventually work, but wave
> IDs were not working until recent builds of Vista.
> You might not have a
> build with this correction. I don't have the
> information at my fingertips
> regarding when this was corrected.
> 
>  
> 
> Frank Yerrace
> 
> Technical Lead
> 
> Microsoft Corporation
> 
>  
> 
> This posting is provided "AS IS" with no warranties,
> and confers no rights.
> 
>  
> 
>  
> 
>   _____  
> 
> From: wdmaudiodev-bounce@xxxxxxxxxxxxx
> [mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf
> Of Sam Tertzakian
> Sent: Wednesday, March 08, 2006 5:08 PM
> To: wdmaudiodev@xxxxxxxxxxxxx
> Subject: [wdmaudiodev] Re: waveOutSetVolume() under
> Vista returns
> MMSYSERR_NOTSUPPORTED
> 
>  
> 
> Hi,
> 
>  
> 
> I wrote a bunch of code to set/get the volume using
> the Mixer API and it
> works under XP with my driver.but the same code with
> same driver does not
> work under Vista.
> 
>  
> 
> So, I cannot set the volume using the Wave API or
> the Mixer API under Vista.
> Yet, when I change the volume using the control
> panel under Vista, the
> messages do get to my driver.
> 
>  
> 
>   _____  
> 
> From: wdmaudiodev-bounce@xxxxxxxxxxxxx
> [mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf
> Of Sam Tertzakian
> Sent: Wednesday, March 08, 2006 3:00 PM
> To: wdmaudiodev@xxxxxxxxxxxxx
> Subject: [wdmaudiodev] Re: waveOutSetVolume() under
> Vista returns
> MMSYSERR_NOTSUPPORTED
> 
>  
> 
> Hi, 
> 
>  
> 
> I wrote an audio driver that works under XP and
> Vista. It passes XP WHQL.
> Under XP, when I call waveOutSetVolume() and
> waveOutGetVolume() everything
> works. But, under Vista both those functions return
> MMSYSERR_NOT_SUPPORTED.
> 
>  
> 
> Does anybody know why this would be? Is that API not
> supported anymore? Do I
> have to do something different in my driver under
> Vista to make this call
> work?
> 
>  
> 
> Under Vista the driver works very well.for example,
> when I change the volume
> using MSN messenger that works. It is just the
> waveXxxGetVolume and
> waveXxxSetVolume calls that fail.
> 
>  
> 
>   _____  
> 
> From: wdmaudiodev-bounce@xxxxxxxxxxxxx
> [mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf
> Of Sam Tertzakian
> Sent: Tuesday, March 07, 2006 9:37 AM
> To: wdmaudiodev@xxxxxxxxxxxxx
> Subject: [wdmaudiodev] waveOutSetVolume() under
> Vista returns
> MMSYSERR_NOTSUPPORTED
> 
>  
> 
> Hi,
> 
> I am receving MMSYSERR_NOTSUPPORTED when I call
> waveOutSetVolume() under
> Vista (latest CTP version). Under XP, the same code
> returns no error.
> 
> Is this API no longer supported under Vista?
> 
> Is there a new API for controlling the volume, or do
> we have to use the
> MixerAPI?
> 
> Thank you
> 
>  
> 
> 

******************

WDMAUDIODEV addresses:
Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
Unsubscribe:  mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx

URL to WDMAUDIODEV page:
http://www.wdmaudiodev.com/

Other related posts: