MediaPortal Audio renderer - better video playback quality | Page 27

Discussion in 'General Development (no feature request here!)' started by tourettes, July 12, 2010.

  1. Seeco

    Seeco Portal Pro

    Joined:
    October 15, 2007
    Messages:
    241
    Likes Received:
    7
    Location:
    Linköping
    Ratings:
    +7 / 0
    Home Country:
    Sweden Sweden
    I think this question might have gotten lost somewhere back there :) Tourettes, could you explain to me once more, like you would to a child:

    - Will it become possible to change volume with "WASAPI on"?
    - What are the negative side effects of turning WASAPI off?

    Sorry :)


     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. tourettes
    • Premium Supporter

    tourettes Retired Team Member

    Joined:
    January 7, 2005
    Messages:
    17,301
    Likes Received:
    4,595
    Ratings:
    +4,810 / 3
    It should already work with the exclusive mode turned off. But the non-exclusive mode is not recommended since it will require resampling (not implemented in the renderer) to match the current audio device sample rate etc. (applications cannot change these, they are general for all applications and are configured on driver / control panel level).

    Will it work with WASAPI & exclusive mode? Maybe some day... but it would require volume control code to be written for the audio renderer (and to hope that audio renderer has some interface that can catch the volume events). So, it could work at some day, but the preferable way to adjust volume is always the aplifier's own volume "knob" since it will provide the best quality (always).

    Bigger latency (not most likely an issue, since it will be only few ms)
    OS mixer can introduce resampling -> lower audio quality

    At least those, maybe some others as well.
     
  4. Seeco

    Seeco Portal Pro

    Joined:
    October 15, 2007
    Messages:
    241
    Likes Received:
    7
    Location:
    Linköping
    Ratings:
    +7 / 0
    Home Country:
    Sweden Sweden
    Thanks alot! :)

    So the recommendation is (and probably will be) to control volume at the amplifier? The only slight drawback then is the need for two remotes, but if I could get my MCE remote to do it, the "problem" would be solved.

    I also wonder if I could sneak an off-topic question in here, while I'm discursing with the MP audio gods?

    For a long time I have found Mediaportal audio very low. It hasn't always been like this. I'm using SAF for codecs, which means ffdshow audio. I have even set the audio codec to amplify audio with some 200%, but it's still low. DVDs seem to produce higher volume, while ripped HD .mkvs are quite silent, especially TV series. System volume is at max. Is there anything else that can be fiddled with?
     
  5. tourettes
    • Premium Supporter

    tourettes Retired Team Member

    Joined:
    January 7, 2005
    Messages:
    17,301
    Likes Received:
    4,595
    Ratings:
    +4,810 / 3
    Matt Goyer’s Media Center Blog Programming your MCE remote

    Most likely it is just how the audio is in the original broadcast / source.
     
  6. red5goahead
    • Premium Supporter

    red5goahead MP Donator

    Joined:
    November 24, 2007
    Messages:
    695
    Likes Received:
    96
    Gender:
    Male
    Occupation:
    Software engineering
    Location:
    Italy, North West
    Ratings:
    +144 / 1
    Home Country:
    Italy Italy
    Show System Specs
    With original driver do not work at all. even with reclock. With that kind of driver have no sense use the digital device because ac3 encoder aboard.
    so I reinstall again the open source driver. the play do not start.

    Code (Text):
    1. 02-08-2010 20:29:27.101 [  980] Target end point: {0.0.0.00000000}.{645b8def-9693-4f94-a1bf-e3614701b480}
    2. 02-08-2010 20:29:27.101 [  980] GetAvailableAudioDevices
    3. 02-08-2010 20:29:27.101 [  980] CreateAudioClient
    4. 02-08-2010 20:29:27.101 [  980] CreateAudioClient success
    5. 02-08-2010 20:29:27.103 [  980] CheckMediaType WASAPI client accepted the format
    6. 02-08-2010 20:29:27.103 [  980] SetMediaType
    7. 02-08-2010 20:29:27.103 [  980] CompleteConnect
    8. 02-08-2010 20:29:27.103 [  980] InitCoopLevel Putting thread in higher priority for Wasapi mode (lowest latency)
    9. 02-08-2010 20:29:27.103 [  980] CompleteConnect Success
    10. 02-08-2010 20:29:27.157 [  980] Pause
    11. 02-08-2010 20:29:27.416 [ 13a4] Run
    12. 02-08-2010 20:29:27.416 [ 13a4] CheckAudioClient
    13. 02-08-2010 20:29:27.416 [ 13a4] WAVEFORMATEX:
    14. 02-08-2010 20:29:27.416 [ 13a4]   nAvgBytesPerSec 192000
    15. 02-08-2010 20:29:27.416 [ 13a4]   nBlockAlign     4
    16. 02-08-2010 20:29:27.416 [ 13a4]   nChannels       2
    17. 02-08-2010 20:29:27.416 [ 13a4]   nSamplesPerSec  48000
    18. 02-08-2010 20:29:27.416 [ 13a4]   wBitsPerSample  16
    19. 02-08-2010 20:29:27.416 [ 13a4]   wFormatTag      146
    20. 02-08-2010 20:29:27.416 [ 13a4] CheckAudioClient First initialization of the audio renderer
    21. 02-08-2010 20:29:27.416 [ 13a4] InitAudioClient
    22. 02-08-2010 20:29:27.436 [ 13a4] InitAudioClient format supported
    23. 02-08-2010 20:29:27.448 [ 13a4] InitAudioClient Initialize failed (0x80070057)
    24. 02-08-2010 20:29:27.448 [ 13a4] Run: error on check audio client (0x80070057)
    25. 02-08-2010 20:29:27.450 [ 13a4] SetBias: 1.0000000238
    26. 02-08-2010 20:29:27.450 [ 13a4] SetBias - updated SoundTouch tempo
    27. 02-08-2010 20:29:27.469 [  980] Pause
    28. 02-08-2010 20:29:27.469 [  980] Stop
    29. 02-08-2010 20:29:27.469 [  980] Stop - releasing WASAPI resources
    30. 02-08-2010 20:29:28.387 [  980] MP Audio Renderer - destructor - instance 0x14bee3f0
    31. 02-08-2010 20:29:28.387 [  980] Stop
    32. 02-08-2010 20:29:28.388 [ 11b4] Resampler thread - closing down - thread ID: 4532
    33. 02-08-2010 20:29:28.388 [ 17f0] Render thread - closing down - thread ID: 6128
    34. 02-08-2010 20:29:28.388 [  980] CloseEncoder - Closing AC3 encoder
    35. 02-08-2010 20:29:28.388 [  980] MP Audio Renderer - destructor - instance 0x14bee3f0 - end
    36.  
     
  7. tourettes
    • Premium Supporter

    tourettes Retired Team Member

    Joined:
    January 7, 2005
    Messages:
    17,301
    Likes Received:
    4,595
    Ratings:
    +4,810 / 3
    For some reason the driver refuses to work with the "wFormatTag 146" which is SPDIF. This is even when the driver says that it supports the format... go figure.

    And you get sound with just turning the AC3 encoding off?
     
  8. red5goahead
    • Premium Supporter

    red5goahead MP Donator

    Joined:
    November 24, 2007
    Messages:
    695
    Likes Received:
    96
    Gender:
    Male
    Occupation:
    Software engineering
    Location:
    Italy, North West
    Ratings:
    +144 / 1
    Home Country:
    Italy Italy
    Show System Specs
    do not work even with ac3 encoding off.

    Code (Text):
    1. 02-08-2010 20:53:27.257 [  97c] Target end point: {0.0.0.00000000}.{645b8def-9693-4f94-a1bf-e3614701b480}
    2. 02-08-2010 20:53:27.257 [  97c] GetAvailableAudioDevices
    3. 02-08-2010 20:53:27.258 [  97c] CreateAudioClient
    4. 02-08-2010 20:53:27.258 [  97c] CreateAudioClient success
    5. 02-08-2010 20:53:27.260 [  97c] CheckMediaType WASAPI client accepted the format
    6. 02-08-2010 20:53:27.260 [  97c] SetMediaType
    7. 02-08-2010 20:53:27.261 [  97c] CompleteConnect
    8. 02-08-2010 20:53:27.261 [  97c] InitCoopLevel Putting thread in higher priority for Wasapi mode (lowest latency)
    9. 02-08-2010 20:53:27.261 [  97c] CompleteConnect Success
    10. 02-08-2010 20:53:27.295 [  97c] Pause
    11. 02-08-2010 20:53:27.429 [  258] Run
    12. 02-08-2010 20:53:27.429 [  258] CheckAudioClient
    13. 02-08-2010 20:53:27.429 [  258] WAVEFORMATEX:
    14. 02-08-2010 20:53:27.429 [  258]   nAvgBytesPerSec 192000
    15. 02-08-2010 20:53:27.429 [  258]   nBlockAlign     4
    16. 02-08-2010 20:53:27.429 [  258]   nChannels       2
    17. 02-08-2010 20:53:27.429 [  258]   nSamplesPerSec  48000
    18. 02-08-2010 20:53:27.429 [  258]   wBitsPerSample  16
    19. 02-08-2010 20:53:27.429 [  258]   wFormatTag      1
    20. 02-08-2010 20:53:27.429 [  258] CheckAudioClient First initialization of the audio renderer
    21. 02-08-2010 20:53:27.429 [  258] InitAudioClient
    22. 02-08-2010 20:53:27.430 [  258] InitAudioClient format supported
    23. 02-08-2010 20:53:27.436 [  258] InitAudioClient Initialize failed (0x80070057)
    24. 02-08-2010 20:53:27.436 [  258] Run: error on check audio client (0x80070057)
    25. 02-08-2010 20:53:27.438 [  258] SetBias: 1.0000000000
    26. 02-08-2010 20:53:27.438 [  258] SetBias - updated SoundTouch tempo
    27. 02-08-2010 20:53:27.469 [  97c] Pause
    28. 02-08-2010 20:53:27.470 [  97c] Stop
    29. 02-08-2010 20:53:27.470 [  97c] Stop - releasing WASAPI resources
    30. 02-08-2010 20:53:27.880 [  97c] MP Audio Renderer - destructor - instance 0x1207f2e8
    31. 02-08-2010 20:53:27.880 [  97c] Stop
    32. 02-08-2010 20:53:27.880 [ 14a4] Resampler thread - closing down - thread ID: 5284
    33. 02-08-2010 20:53:27.880 [ 1798] Render thread - closing down - thread ID: 6040
    34. 02-08-2010 20:53:27.880 [  97c] MP Audio Renderer - destructor - instance 0x1207f2e8 - end
     
  9. tourettes
    • Premium Supporter

    tourettes Retired Team Member

    Joined:
    January 7, 2005
    Messages:
    17,301
    Likes Received:
    4,595
    Ratings:
    +4,810 / 3
    In that case it makes much more sence. Did that driver ever work with the version 5 of the audio renderer? I see similar behavior with the NVIDIA GPU's with HDMI connection -> seems that drivers aren't supporting the event / pull mode of WASAPI.
     
  10. tourettes
    • Premium Supporter

    tourettes Retired Team Member

    Joined:
    January 7, 2005
    Messages:
    17,301
    Likes Received:
    4,595
    Ratings:
    +4,810 / 3
    Anyone having the "famous" error code:

    Please test the WASAPI driver capabilities with following MS sample code application:

    Sample - playing silence via WASAPI event-driven (pull) mode - Matthew van Eerde's web log - Site Home - MSDN Blogs

    First run:

    silence.exe --list-devices

    And then

    silence.exe --device + the name of the audio device listed in the 1st step.

    Please report what drivers and HW are returning error, since this seems to be a driver limitation :( WASAPI pull mode is not supported all drivers and I'm not happy if we need to add that push mode (that causes such many pops and clicks for different HW).
     
  11. tourettes
    • Premium Supporter

    tourettes Retired Team Member

    Joined:
    January 7, 2005
    Messages:
    17,301
    Likes Received:
    4,595
    Ratings:
    +4,810 / 3
    Before testing that please wait a bit. After looking at the sample's source code seems that it is not using the exclusice mode. So the drivers are most likely "broken by te design" only in the WASAPI exclusive mode.

    I'll modify the test application to support both exclusive and shared WASAPI modes.
     
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!