Dear Sirs,
Recently, I am developing a msvad driver(Microsoft virtual audio device), which is based on the DDK sample called msvad-ds2dhw. And I met a problem how to change the volume in the wavecyclic miniport driver. Now, I can trace KSPROPERTY_AUDIO_VOLUMELEVEL request by adding case KSPROPERTY_AUDIO_VOLUMELEVEL in function PropertyHandlerGeneric of the wavecyclic miniport driver. But I don’t know how to handle this request in order to change the volume.
What should I do to complete this task?(What I mean exactly is that the volume of the wave file saved is changed after I handle the KSPROPERTY_AUDIO_VOLUMELEVEL request.)
Thank you for your reading and answering.
xxxxx@gmail.com wrote:
Dear Sirs,
Recently, I am developing a msvad driver(Microsoft virtual audio device), which is based on the DDK sample called msvad-ds2dhw. And I met a problem how to change the volume in the wavecyclic miniport driver. Now, I can trace KSPROPERTY_AUDIO_VOLUMELEVEL request by adding case KSPROPERTY_AUDIO_VOLUMELEVEL in function PropertyHandlerGeneric of the wavecyclic miniport driver. But I don’t know how to handle this request in order to change the volume.
What should I do to complete this task?(What I mean exactly is that the volume of the wave file saved is changed after I handle the KSPROPERTY_AUDIO_VOLUMELEVEL request.)
I’m not sure I understand the question. Are you saying you don’t know
what “changing the volume” means in an audio stream? To change the
volume in a stream, you essentially have to multiply every sample by
some factor. Typically, the raw data is considered 100% volume, so that
the volume node always reduces (or “attenuates”) the level. If the
volume control is set to 50%, then you divide every sample by 2.
That’s a bit simplistic, because most volume circuits actually use a
logarithmic scale, but that’s the basic concept.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.