Quantcast
Channel: Media Foundation Development for Windows Desktop forum
Viewing all articles
Browse latest Browse all 1079

Having separate volume control over multiple media sessions

$
0
0

Hello, I have a class that loads an audio file (wav/mp3) and play them, the class has IMFSimpleAudioVolume member initialized with MFGetSErvice for example:

IMFSimpleAudioVolume* pVolume;

MFGetService(pSink, MR_POLICY_VOLUME_SERVICE, IID_PPV_ARGS(&pVolume));

I won't post entry class here since it's huge, but basically the class is a media session that plays a single file.

I create multiple objects of this class, each object representing an audio file that plays in same time as other files, the problem is that when I change master volume in one object (for one file) via IMFSimpleAudioVolume::SetMasterVolume the master volume changes the volume of other objects (files) too!

I need to have each object their own volume level independent of each other, so that if I change volume in one object it does not touch volume of other object. but currently it does when I call IMFSimpleAudioVolume::SetMasterVolume

How do I achieve that? is it possible to have master volume separate for each media session? for example having a master volume and volume control for separate media sessions.

Thank you a lot, any advice is welcome!



Viewing all articles
Browse latest Browse all 1079

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>