[wdmaudiodev] Re: Retrieving WAVEFORMATEX from IAudioSessionControl

  • From: Dadi <dadiku@xxxxxxxxx>
  • To: wdmaudiodev@xxxxxxxxxxxxx
  • Date: Tue, 16 Dec 2014 16:02:21 +0200

Hi Matthew,

Our global APO needs that information for its processing logic.

E.g. for doing surround upmix we need to know the channel count of all open
sessions. That way we can find if an app opened a stereo channel to play
audio (and so the APO should do upmix) or if an app is playing full
surround and intentionally only two channels are active (e.g. can happen
while a movie is played) and in this case we should NOT do any upmix in the
APO.

Because there can be many audio sessions simultaneous then we will take the
minimum or maximum values for reference.
The above is only one example and there are other cases in which our APO
needs to know the original format.

Windows API allows us to enumerate all the active audio sessions (we can
filter it per endpoint) and get IAudioSessionControl for each session but
we need to use it to get the active WAVESFORMATEX.

Note - we do not have any SFX APOs, only global.

Is there any way to resolve this?

Thank you,
Dadi




2014-12-15 18:58 GMT+02:00 Matthew van Eerde <
Matthew.van.Eerde@xxxxxxxxxxxxx>:

>  Conceptually, an audio session (IAudioSessionControl) is an (app,
> endpoint) pair.
>
>
>
> An app can have zero or more active streams (IAudioClient) on a given
> endpoint at any given time.
>
>
>
> The stream has an associated WAVEFORMATEX (what was passed to
> IAudioClient::Initialize) but there’s no way to retrieve it from the
> IAudioClient.
>
>
>
> There is also no way to get the list of active IAudioClients from an
> IAudioSessionControl.
>
>
>
> What is the larger problem you’re trying to solve?
>
>
>
> *From:* wdmaudiodev-bounce@xxxxxxxxxxxxx [mailto:
> wdmaudiodev-bounce@xxxxxxxxxxxxx] *On Behalf Of *Dadi
> *Sent:* Sunday, December 14, 2014 11:21 AM
> *To:* wdmaudiodev@xxxxxxxxxxxxx
> *Subject:* [wdmaudiodev] Retrieving WAVEFORMATEX from IAudioSessionControl
>
>
>
> Hi,
>
> Is it possible to retrieve the audio session format (WAVEFORMATEX) from a
> given pointer to an active IAudioSessionControl?
>
> Thank you,
>
> Dadi
>

Other related posts: