[wdmaudiodev] Re: KSEVENT_CONTROL_CHANGE Questions

  • From: "Sam Tertzakian" <sam@xxxxxxxxxxx>
  • To: <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Wed, 15 Mar 2006 05:10:54 -0800

Hi, Hock,

 

Yes, it works! I really want to thank you for the information.

 

Really, I cannot thank you enough. 

 

(The reason it was not working when I originally implemented your suggestion
is that I had an unrelated bug that I had introduced while I was trying to
figure out how to make this all work.)

 

Sam

 

  _____  

From: wdmaudiodev-bounce@xxxxxxxxxxxxx
[mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of Hock Yiung HUANG
Sent: Tuesday, March 14, 2006 2:36 PM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Re: KSEVENT_CONTROL_CHANGE Questions

 

Hi,

I have done the same thing for the Audio Filter, and it works. Here is how
the event handler is specified.

DEFINE_KSEVENT_TABLE(ControlEventTable)
{
DEFINE_KSEVENT_ITEM
(
KSEVENT_CONTROL_CHANGE, // EventId
sizeof(KSEVENTDATA), // DataInput
sizeof(ULONG) * 2, // ExtraEntryData
CAudioFilter::AddControlEvent, // AddHandler
CAudioFilter::RemoveControlEvent, // RemoveHandler
NULL // SupportHandler
)
};

DEFINE_KSEVENT_SET_TABLE(ControlEventSetTable)
{
DEFINE_KSEVENT_SET
(
&KSEVENTSETID_AudioControlChange, // Set
SIZEOF_ARRAY(ControlEventTable), // EventsCount
ControlEventTable // EventItem
)
};

DEFINE_KSAUTOMATION_TABLE(VolumeLevelAutomationTable)
{
DEFINE_KSAUTOMATION_PROPERTIES(VolumeLevelPropertySetTable),
DEFINE_KSAUTOMATION_METHODS_NULL,
DEFINE_KSAUTOMATION_EVENTS(ControlEventSetTable)
};

In the add/remove event handlers,

NTSTATUS
CAudioFilter::
AddControlEvent
(
IN PIRP Irp,
IN PKSEVENTDATA EventData,
IN PKSEVENT_ENTRY EventEntry
)
{
ASSERT(EventData);
ASSERT(EventEntry);

_DbgPrintF(DEBUGLVL_VERBOSE,("[CAudioFilter::AddControlEvent]"));

PIO_STACK_LOCATION IrpStack = IoGetCurrentIrpStackLocation(Irp);

CAudioFilter * AudioFilter =
(CAudioFilter*)(KsGetFilterFromIrp(Irp)->Context);

PKSFILTER KsFilter = KsGetFilterFromIrp(Irp);

ULONG NodeId = KsGetNodeIdFromIrp(Irp);

NTSTATUS ntStatus = STATUS_INVALID_PARAMETER;

if (NodeId != KSFILTER_NODE)
{
// ExtraEntryData: First ULONG points to the PinId, followed by
// the NodeId. This is used in the KsGenerateEvents() callback routine 
// to determine whether to generate an event or not.
PULONG PinId_ = PULONG(EventEntry + 1);

*PinId_ = ULONG(-1);

PULONG NodeId_ = PULONG(PinId_ + 1);

*NodeId_ = NodeId;

KsFilterAddEvent(KsFilter, EventEntry);

ntStatus = STATUS_SUCCESS;
}

return ntStatus;
}

VOID
CAudioFilter::
RemoveControlEvent
(
IN PFILE_OBJECT FileObject,
IN PKSEVENT_ENTRY EventEntry
)
{
ASSERT(FileObject);
ASSERT(EventEntry);

_DbgPrintF(DEBUGLVL_VERBOSE,("[CAudioFilter::RemoveControlEvent]"));

//CAudioFilter * AudioFilter =
(CAudioFilter*)(KsGetFilterFromIrp(Irp)->Context);

PKSFILTER KsFilter = KsGetFilterFromFileObject(FileObject);

if (EventEntry)
{
RemoveEntryList(&EventEntry->ListEntry);
}
}

To generate the events, define a callback function to verify whether to
generate the callback for the particular node, pin or filter.

typedef struct
{
PVOID MajorTarget; /*!< @brief Pointer to the filter. */
PVOID MinorTarget; /*!< @brief Not used. */
GUID * Set; /*!< @brief Pointer to the event set. */
ULONG EventId; /*!< @brief Identifier of the event. */
BOOL PinEvent; /*!< @brief TRUE for a pin event, otherwise FALSE. */
ULONG PinId; /*!< @brief Identifier of the pin. */
BOOL NodeEvent; /*!< @brief TRUE for a node event, otherwise FALSE. */
ULONG NodeId; /*!< @brief Identifier for the node. */
} AUDIO_EVENT_REQUEST, *PAUDIO_EVENT_REQUEST;

static
BOOLEAN 
PerformCallbackVerification
(
IN PVOID Context,
IN PKSEVENT_ENTRY EventEntry
)
{
PULONG PinId = PULONG(EventEntry+1);

PULONG NodeId = PULONG(PinId + 1);

BOOLEAN Callback = TRUE;

PAUDIO_EVENT_REQUEST EventRequest = PAUDIO_EVENT_REQUEST(Context);

if (EventRequest->PinEvent && EventRequest->NodeEvent)
{
Callback = (EventRequest->PinId == *PinId) && (EventRequest->NodeId ==
*NodeId);
}
else if (EventRequest->PinEvent)
{
Callback = (EventRequest->PinId == *PinId);
}
else if (EventRequest->NodeEvent)
{
Callback = (EventRequest->NodeId == *NodeId);
}

return Callback;
}

The following code fragment generates a node event for Node 10:

AUDIO_EVENT_REQUEST EventRequest;

EventRequest.MajorTarget = this;
EventRequest.MinorTarget = NULL;
EventRequest.Set = &KSEVENTSETID_AudioControlChange;
EventRequest.EventId = KSEVENT_CONTROL_CHANGE;
EventRequest.PinEvent = FALSE;
EventRequest.PinId = PinId;
EventRequest.NodeEvent = TRUE;
EventRequest.NodeId = 10;

KsFilterGenerateEvents(m_KsFilter, &KSEVENTSETID_AudioControlChange,
KSEVENT_CONTROL_CHANGE, 0, NULL, PerformCallbackVerification,
&EventRequest);


Hope this help.

-Hock

Inactive hide details for "Sam Tertzakian" <sam@xxxxxxxxxxx>"Sam Tertzakian"
<sam@xxxxxxxxxxx>




"Sam Tertzakian" <sam@xxxxxxxxxxx> 
Sent by: wdmaudiodev-bounce@xxxxxxxxxxxxx 

03/14/2006 01:59 PM


Please respond to
wdmaudiodev@xxxxxxxxxxxxx




To


<wdmaudiodev@xxxxxxxxxxxxx>




cc






Subject


[wdmaudiodev] Re: KSEVENT_CONTROL_CHANGE Questions

 







Hi, Rich,

I specified AVStrMiniAddEvent and it turns out that the AddEvent handler is
not called. So, this is likely part of the problem. I have other events
(private events) where the AddHandler is called, but it is not called for
this event. What I am worried about is that I am doing this in the audio
filter and not a Topology Filter. I don't have a Topology Filter because
there is no way to connect the Audio Filter to the Topology filter in
AVStream since PcRegisterPhysicalConnections() does not exist for AVStream.
In every other way this driver is good to.it passes WHQL under XP. I just
need to add this bit of functionality. (By the way, right now, I am testing
under XP, not Vista.)

Here is what my code looks like for setting up the event:

NTSTATUS
AVStrMiniAddEvent(
IN PIRP Irp,
IN PKSEVENTDATA EventData,
IN struct _KSEVENT_ENTRY *EventEntry
);

VOID
AVStrMiniRemoveEvent(
IN PFILE_OBJECT FileObject,
IN struct _KSEVENT_ENTRY *EventEntry
);

DEFINE_KSEVENT_TABLE( EventsAudioControlChange )
{
// Volume Event Happened
//
DEFINE_KSEVENT_ITEM
(
KSEVENT_CONTROL_CHANGE, // Id
sizeof( KSE_NODE ), // DataInput
0, // ExtraEntryData
AVStrMiniAddEvent, // AddHandler
AVStrMiniRemoveEvent, // RemoveHandler
NULL // SupportHandler
)
};

DEFINE_KSEVENT_SET_TABLE( VolumeEventSets )
{
DEFINE_KSEVENT_SET
( 
&KSEVENTSETID_AudioControlChange, // Event Set GUID
SIZEOF_ARRAY(EventsAudioControlChange), // EventsCount
EventsAudioControlChange // EventItem
),
};

DEFINE_KSAUTOMATION_TABLE( VolumeAutomationWithEvents )
{
DEFINE_KSAUTOMATION_PROPERTIES( VolumePropertySets ),
DEFINE_KSAUTOMATION_METHODS_NULL,
DEFINE_KSAUTOMATION_EVENTS( VolumeEventSets )
};

const KSNODE_DESCRIPTOR FilterNodes[] =
{
{
NULL, // PKSAUTOMATION_TABLE AutomationTable;
&KSNODETYPE_ADC, // Type
NULL // Name
},
{
NULL, // PKSAUTOMATION_TABLE AutomationTable;
&KSNODETYPE_DAC, // Type
NULL // Name
},
// This is the node that needs to generate an event.
//
{
&VolumeAutomationWithEvents, // PKSAUTOMATION_TABLE AutomationTable;
&KSNODETYPE_VOLUME, // Type
&KSAUDFNAME_MASTER_VOLUME // Name
},
{
&MuteAutomation, // PKSAUTOMATION_TABLE AutomationTable;
&KSNODETYPE_MUTE, // Type
&KSAUDFNAME_WAVE_MUTE // Name
},
};

Also you said: "Second, in the KsFilterGenerateEvents() call set parameters
4 and 5 to null as you don't pass any data in this type of call."
But, then how is KsFilterGenerateEvents supposed to know which node is
generating the event? That is why I am setting up the KSE_NODE structure.

KSE_NODE
Node;
Node.Event.Set = KSEVENTSETID_AudioControlChange;
Node.Event.Id = KSEVENT_CONTROL_CHANGE;
Node.Event.Flags = KSEVENT_TYPE_ONESHOT;
Node.NodeId = NODE_REN_VOL;
Node.Reserved = 0;

// I am doing this for all the instantiated filters.
//
KsFilterGenerateEvents(
pCurFilter,
KSEVENTSETID_AudioControlChange,
KSEVENT_CONTROL_CHANGE,
Sizeof( Node ),
&Node,
NULL,
NULL
);

  _____  

From: wdmaudiodev-bounce@xxxxxxxxxxxxx
[mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of Richard Fricks
Sent: Tuesday, March 14, 2006 10:16 AM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Re: KSEVENT_CONTROL_CHANGE Questions

Couple more things to consider. First, to confirm that AVStream is properly
finding your registration, specify a AVStrMiniAddEvent handler. This is an
optional handler, but it will get called when the system activates
monitoring of this control type. This would help confirm whether or not
AVStream is properly identifying your registration of the event handler.
Second, in the KsFilterGenerateEvents() call set parameters 4 and 5 to null
as you don't pass any data in this type of call. You can also specify a
callback function as parameter 6 and again this can be helpful from a
debugging standpoint as it should get called as part of KS's handling of
your notification.

-Rich



-----Original Message-----
From: wdmaudiodev-bounce@xxxxxxxxxxxxx
[mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of Sam Tertzakian
Sent: Tuesday, March 14, 2006 4:50 AM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Re: KSEVENT_CONTROL_CHANGE Questions

Hi, 

I am unable to make the KSEVENT_CONTROL_CHANGE to work (even under XP). The
problem is that I am using an AVStream driver, not a PortCls driver, so the
SB16 sample does not really apply.

With regard to the question below: Yes, I am specifying the Even table in
the AutomationTable element of the Volume node.

When the volume changes on the hardware I am calling:

KSE_NODE
Node;
Node.Event.Set = KSEVENTSETID_AudioControlChange;
Node.Event.Id = KSEVENT_CONTROL_CHANGE;
Node.Event.Flags = KSEVENT_TYPE_ONESHOT;
Node.NodeId = NODE_REN_VOL;
Node.Reserved = 0;

// I am doing this for all the instantiated filters.
//
KsFilterGenerateEvents(
pCurFilter,
KSEVENTSETID_AudioControlChange,
KSEVENT_CONTROL_CHANGE,
Sizeof( Node ),
&Node,
NULL,
NULL
);

To test I open the Volume Slider app in XP and run a program that causes the
event to be set. But the slider does not move.

Does anybody see anything that I am doing wrong?

Thank you for your time.I really appreciate it.

  _____  

From: wdmaudiodev-bounce@xxxxxxxxxxxxx
[mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of Richard Fricks
Sent: Friday, March 10, 2006 2:02 PM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Re: KSEVENT_CONTROL_CHANGE Questions

Are you specifying the event table in the
KSFILTER_DESCRIPTOR.KSNODE_DESCRIPTOR.AutomationTable.Event for the
appropriate node?


Thanks,
Rich

-----Original Message-----
From: wdmaudiodev-bounce@xxxxxxxxxxxxx
[mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of Sam Tertzakian
Sent: Friday, March 10, 2006 1:22 PM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Re: KSEVENT_CONTROL_CHANGE Questions

Hi, Rich,

The problem is that driver is a PortCls driver, but since my driver is a
pure AVStream driver, I need to use the more primitive
KsPinGenerateEvents().and that is why I am somewhat unsure about how to set
the event. 

There is one other issue.My driver does not have a Topology, so that may be
one of the problems.I may have to make a Toplogy (which is always
instantiated) because the Pins are not always instantiated.

My volume nodes are in the wave filter driver along with the ADC and DAC
nodes. I only have a wave filter, not a topology filter.

  _____  

From: wdmaudiodev-bounce@xxxxxxxxxxxxx
[mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of Richard Fricks
Sent: Friday, March 10, 2006 1:07 PM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Re: KSEVENT_CONTROL_CHANGE Questions

The SB16 sample in the DDK contains a volume control implementation using
KSEVENT_CONTROL_CHANGE. Have you looked at that to see how it is
implemented?

-Rich

-----Original Message-----
From: wdmaudiodev-bounce@xxxxxxxxxxxxx
[mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of Sam Tertzakian
Sent: Friday, March 10, 2006 12:46 PM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] KSEVENT_CONTROL_CHANGE Questions

Hi, 

I am trying to implement KSEVENT_CONTROL_CHANGE in my AVStream Audio driver
but I am unsure about a couple of things:

Is this how I should set the event in an AVStream driver?

KSE_NODE Node;

Node.Event.Set = KSEVENTSETID_AudioControlChange;
Node.Event.Id = KSEVENT_CONTROL_CHANGE;
Node.Event.Flags = KSEVENT_TYPE_ENABLE | KSEVENT_TYPE_ONESHOT;
Node.NodeId = NODE_REN_VOL; /* node id */
Node.Reserved = 0;

KsPinGenerateEvents(
pPin,
&KSEVENTSETID_AudioControlChange,
KSEVENT_CONTROL_CHANGE,
sizeof( Node ),
&Node,
NULL,
NULL
);

This is how I have defined the event:

DEFINE_KSEVENT_TABLE( EventsAudioControlChange )
{
// Volume Event Happened
//
DEFINE_KSEVENT_ITEM
(
KSEVENT_CONTROL_CHANGE, // Id
sizeof( KSE_NODE ), // DataInput
0, // ExtraEntryData
NULL, // AddHandler
NULL, // RemoveHandler
NULL // SupportHandler
)
};

// Table of all Event sets supported by the pins.
//
DEFINE_KSEVENT_SET_TABLE( AudioPinEventSets )
{
DEFINE_KSEVENT_SET
( 
&KSEVENTSETID_AudioControlChange, // Event Set GUID
SIZEOF_ARRAY(EventsAudioControlChange), // EventsCount
EventsAudioControlChange // EventItem
),
};

And I added AudioPinEventSets to the PinAutomation member of the Pin
descriptor.

I have other events created by the driver and they work properly, but this
event does not seem to be doing anything. 

I tried attaching it both to filter and pin.

One of the problems is that I think that if the wave device is not open,
then the pin is not instantiated. So, even the above code is proper (to set
the event), the pin won't actually exist if the device is not open, so the
volume control slider will not change.

  _____  

From: wdmaudiodev-bounce@xxxxxxxxxxxxx
[mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of Mitchell Rundle
Sent: Thursday, March 09, 2006 4:53 PM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Re: waveOutSetVolume() under Vista returns
MMSYSERR_NOTSUPPORTED

The volume node that you are controlling needs to support
KSEVENT_CONTROL_CHANGE.

Regards,
Mitch Rundle
Microsoft

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: Thursday, March 09, 2006 12:31 PM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Re: waveOutSetVolume() under Vista returns
MMSYSERR_NOTSUPPORTED
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 ri ghts.

  _____  

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

ForwardSourceID:NT00032E9E 

GIF image

GIF image

GIF image

Other related posts: