locked
The Playback Rate of MediaElement > 1.0 has noise

    Question

  • Problem Description

    When I use the MediaElement for playing MP3 or WAV music files, once the Playback Rate values over 1.0 (for example, set to 1.05), use the MediaElement to play music, noise will occur (especially playback WAV files) and Playback Rate of 1.0 or less, you will not hear a noise occurs.

    To reproduce the problem

    1. the [Control Panel] > [sound] > [Playback] tab > [Speaker] property > [Advanced] > [Default Format]
    2. Select the item is greater than 44100Hz, for example: 48000Hz or 96000Hz
    3. turn on the test App (download the source code to install Window store test app for Playback Rate with noise)
    4. Within the testing App,
    •    Set [Playback rate ratio] is 1.05
    •    Click [Set PlaybackRate] button
    •    Click [Using WAV] button
    •    Click the [Play] button

    Noise in playback music can be heard at this time appears

    Only the Playback Rate > 1.0 only occurs when the noise

    When you set [Playback rate ratio] 1.0 or less than 1.0, there will not be any noise.

    How can I resolve this problem?


    vulcan


    • Edited by Vulcan LeeMVP Tuesday, May 20, 2014 3:16 AM Fix Title
    Tuesday, May 20, 2014 2:19 AM

Answers

  • I noticed that you audio driver is really old (2008). I would recommend that you check with the OEM to see if there is an updated version.

    I also noticed that according to your registry the decoder MFT for your video card is disabled. I'm not sure how this could happen.

    [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows Media Foundation\HardwareMFT]

    EnableDecoders = 0
    EnableEncoders = 1
    EnableVideoProcessors = 1

    If this doesn't resolve the issue the next step is to use PerfView to capture audio event and DPC logs. Typically when there are audio dropouts it is due to long running DPC due to poorly written drivers.

    I hope this helps,

    James


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

    • Marked as answer by Vulcan LeeMVP Friday, May 30, 2014 12:45 AM
    Thursday, May 29, 2014 9:56 PM
    Moderator

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.

    Tuesday, May 20, 2014 1:08 PM
    Moderator
  • Dear Matt

    Thanks for your help.

    Following link is my testing Windows Store App source:

    http://www.mediafire.com/download/zac04dc9dcs3jv4/MediaElementPlayRate.zip


    vulcan

    Tuesday, May 20, 2014 1:33 PM
  • Hello,

    This is a known limitation of legacy codecs. While we to add "constant pitch" playback at higher rates on legacy codecs we do not use "bit smoothing" with these older codecs. If you use a modern codec like WMA or MP4 we use "constant pitch" and "bit smoothing".

    Thanks,

    James


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

    Tuesday, May 20, 2014 10:52 PM
    Moderator
  • Dear James

    I have generated WMA file from WAV file, and test  48000Hz sample rate of Default Format of Sound.

    Only the Playback Rate > 1.0 that can hear noise.
    When you set [Playback rate ratio] 1.0 or less than 1.0, there will not be any noise.

    The updated test app source code as following:

    http://www.mediafire.com/download/zac04dc9dcs3jv4/MediaElementPlayRate.zip

    It looks like WMA does not resolve the problem, do you have a better solution proposals?


    vulcan

    Friday, May 23, 2014 1:57 AM
  • Dear James

    I have changed my test app ( http://www.mediafire.com/download/zac04dc9dcs3jv4/MediaElementPlayRate.zip ) again and Found very interesting things.

    The test app has mp3, wav, wma of sample rate of 44100Hz audio files and 

    also has mp3, wav, wma of sample rate of 48000Hz audios files as following screen capture.

    When these audio files is encoding by 44100Hz and playback rate is 1.05 and the [Control Panel] > [sound] > [Playback] tab > [Speaker] property > [Advanced] > [Default Format] select above 44100Hz(like selected 48000Hz), play these audio files will hear noise.

    When these audio files is encoding by 48000Hz and playback rate is 1.05 and the [Control Panel] > [sound] > [Playback] tab > [Speaker] property > [Advanced] > [Default Format] select above 48000Hz(like selected 96000Hz), play these audio files will hear noise.

    Whend the [Control Panel] > [sound] > [Playback] tab > [Speaker] property > [Advanced] > [Default Format] is the higher the value, heard the noise more obvious


    vulcan

    Friday, May 23, 2014 3:12 PM
  • Can you please generate a DXDiag report for the machine that are causing the problems and upload it to you OneDrive? Using WMA or MP4 (M4A) should not produce any audible clicks and pops at higher playback rates. If your audio / video hardware does not support DXVA then we revert to software decode. If this occurs then you may hear clicks and pops (i.e. buffer underrun).

    -James


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

    Friday, May 23, 2014 11:25 PM
    Moderator
  • Dear James

    I have generated DXDiag report for my computer: http://1drv.ms/Suq0nQ


    vulcan

    Saturday, May 24, 2014 4:25 AM
  • Dear Jame

    Do you have any idea?


    vulcan

    Tuesday, May 27, 2014 2:53 AM
  • I noticed that you audio driver is really old (2008). I would recommend that you check with the OEM to see if there is an updated version.

    I also noticed that according to your registry the decoder MFT for your video card is disabled. I'm not sure how this could happen.

    [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows Media Foundation\HardwareMFT]

    EnableDecoders = 0
    EnableEncoders = 1
    EnableVideoProcessors = 1

    If this doesn't resolve the issue the next step is to use PerfView to capture audio event and DPC logs. Typically when there are audio dropouts it is due to long running DPC due to poorly written drivers.

    I hope this helps,

    James


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

    • Marked as answer by Vulcan LeeMVP Friday, May 30, 2014 12:45 AM
    Thursday, May 29, 2014 9:56 PM
    Moderator
  • Hello,

    Just wanted to let you know that we just released a new tool that might help you track down your problem:

    Media eXperience Analyzer (MXA)

    http://www.microsoft.com/en-us/download/details.aspx?id=43105&WT.mc_id=rss_windows_allproducts

    I hope this helps,

    James


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

    Monday, June 2, 2014 11:14 PM
    Moderator
  • Dear James

    It is good news, I will MXA now.


    vulcan

    Tuesday, June 3, 2014 1:41 AM