locked
MediaElement not applying audio effect when changing audio stream. Win8, Win8.1

    Question

  • Hello!

    I have MediaSource implementation that outputs 2 audio streams. I can switch between them through AudioStreamIndex property. But when I apply AudioEffect (MFT) it applies only to first stream even when switching streams. Is anyone know how to fix this ? Maybe AudioEffect MFT implementation is wrong  for handling audio switching event ? My audio effect MFT is almost 100% identical to this sample http://msdn.microsoft.com/en-us/library/windows/desktop/bb970325%28v=vs.85%29.aspx

    Thursday, July 24, 2014 11:58 AM

All replies

  • I'll ask our media guru to check this out.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Friday, July 25, 2014 7:29 PM
    Moderator
  • Here is Media extensions sample with audio mute effect and test .mpg video :

    Sample

    Test video

    I've added "NextAudio" button to 1 and 4 scenario to test MuteEffect with custom MediaSource and built-in. If effect is applied then you will not hear any sound and it perfectly works with built-in MediaSource(Scenario 4) but not with the custom(Scenario 1).


    Monday, July 28, 2014 1:07 PM
  • Hello Alexander,

    I have returned from holiday. Do you still need help with this?

    Thanks,

    James


    Windows SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/

    Wednesday, August 06, 2014 8:21 PM
    Moderator
  • Yes I still need help. To check do the following:

    - download app and test video

    - go to "Local decoder"

    - tap "Play video" and select Test video (video will be not rendered properly but we have bug with sound)

    - tap "Next Audio" several times to enable/disable "MuteEffect". You will see that you can hear 1 audio channel and not another which is means that "MuteEffect" applies only to 1 channel instead of both of them.

    Thursday, August 14, 2014 7:26 AM
  •   Up
    Tuesday, September 23, 2014 2:56 PM
  • Hello,

    I can still help you with this. I was able to grab your code but unfortunately the video you provided contains copyrighted material and I had to immediately delete it.

    The audio stream index changes when the stream selection changes. The source typically exposes all of the audio streams but they are not connected to the SAR by default. When the stream index changes the new stream is selected and the new presentation descriptor is evaluated. This typically happens inside the "SelectStreams" function.

    Does this help?

    -James


    Windows SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/

    Wednesday, September 24, 2014 12:17 AM
    Moderator