MediaPortal Audio renderer - better video playback quality (2 Viewers)

Seeco

Portal Pro
October 15, 2007
241
7
Linköping
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 :)
 

tourettes

Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    - Will it become possible to change volume with "WASAPI on"?

    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).

    - What are the negative side effects of turning WASAPI off?

    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.
     

    Seeco

    Portal Pro
    October 15, 2007
    241
    7
    Linköping
    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?
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    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.

    Matt Goyer’s Media Center Blog Programming your MCE remote

    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?

    Most likely it is just how the audio is in the original broadcast / source.
     

    red5goahead

    MP Donator
  • Premium Supporter
  • November 24, 2007
    695
    144
    Italy, North West
    Home Country
    Italy Italy
    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:
    02-08-2010 20:29:27.101 [  980] Target end point: {0.0.0.00000000}.{645b8def-9693-4f94-a1bf-e3614701b480}
    02-08-2010 20:29:27.101 [  980] GetAvailableAudioDevices
    02-08-2010 20:29:27.101 [  980] CreateAudioClient
    02-08-2010 20:29:27.101 [  980] CreateAudioClient success
    02-08-2010 20:29:27.103 [  980] CheckMediaType WASAPI client accepted the format
    02-08-2010 20:29:27.103 [  980] SetMediaType
    02-08-2010 20:29:27.103 [  980] CompleteConnect
    02-08-2010 20:29:27.103 [  980] InitCoopLevel Putting thread in higher priority for Wasapi mode (lowest latency)
    02-08-2010 20:29:27.103 [  980] CompleteConnect Success
    02-08-2010 20:29:27.157 [  980] Pause
    02-08-2010 20:29:27.416 [ 13a4] Run
    02-08-2010 20:29:27.416 [ 13a4] CheckAudioClient
    02-08-2010 20:29:27.416 [ 13a4] WAVEFORMATEX:
    02-08-2010 20:29:27.416 [ 13a4]   nAvgBytesPerSec 192000
    02-08-2010 20:29:27.416 [ 13a4]   nBlockAlign     4
    02-08-2010 20:29:27.416 [ 13a4]   nChannels       2
    02-08-2010 20:29:27.416 [ 13a4]   nSamplesPerSec  48000
    02-08-2010 20:29:27.416 [ 13a4]   wBitsPerSample  16
    02-08-2010 20:29:27.416 [ 13a4]   wFormatTag      146
    02-08-2010 20:29:27.416 [ 13a4] CheckAudioClient First initialization of the audio renderer
    02-08-2010 20:29:27.416 [ 13a4] InitAudioClient
    02-08-2010 20:29:27.436 [ 13a4] InitAudioClient format supported
    02-08-2010 20:29:27.448 [ 13a4] InitAudioClient Initialize failed (0x80070057)
    02-08-2010 20:29:27.448 [ 13a4] Run: error on check audio client (0x80070057)
    02-08-2010 20:29:27.450 [ 13a4] SetBias: 1.0000000238
    02-08-2010 20:29:27.450 [ 13a4] SetBias - updated SoundTouch tempo
    02-08-2010 20:29:27.469 [  980] Pause
    02-08-2010 20:29:27.469 [  980] Stop
    02-08-2010 20:29:27.469 [  980] Stop - releasing WASAPI resources
    02-08-2010 20:29:28.387 [  980] MP Audio Renderer - destructor - instance 0x14bee3f0
    02-08-2010 20:29:28.387 [  980] Stop
    02-08-2010 20:29:28.388 [ 11b4] Resampler thread - closing down - thread ID: 4532
    02-08-2010 20:29:28.388 [ 17f0] Render thread - closing down - thread ID: 6128
    02-08-2010 20:29:28.388 [  980] CloseEncoder - Closing AC3 encoder
    02-08-2010 20:29:28.388 [  980] MP Audio Renderer - destructor - instance 0x14bee3f0 - end
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    so I reinstall again the open source driver. the play do not start.

    Code:
    02-08-2010 20:29:27.436 [ 13a4] InitAudioClient format supported
    02-08-2010 20:29:27.448 [ 13a4] InitAudioClient Initialize failed (0x80070057)

    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?
     

    red5goahead

    MP Donator
  • Premium Supporter
  • November 24, 2007
    695
    144
    Italy, North West
    Home Country
    Italy Italy
    so I reinstall again the open source driver. the play do not start.

    Code:
    02-08-2010 20:29:27.436 [ 13a4] InitAudioClient format supported
    02-08-2010 20:29:27.448 [ 13a4] InitAudioClient Initialize failed (0x80070057)

    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?

    do not work even with ac3 encoding off.

    Code:
    02-08-2010 20:53:27.257 [  97c] Target end point: {0.0.0.00000000}.{645b8def-9693-4f94-a1bf-e3614701b480}
    02-08-2010 20:53:27.257 [  97c] GetAvailableAudioDevices
    02-08-2010 20:53:27.258 [  97c] CreateAudioClient
    02-08-2010 20:53:27.258 [  97c] CreateAudioClient success
    02-08-2010 20:53:27.260 [  97c] CheckMediaType WASAPI client accepted the format
    02-08-2010 20:53:27.260 [  97c] SetMediaType
    02-08-2010 20:53:27.261 [  97c] CompleteConnect
    02-08-2010 20:53:27.261 [  97c] InitCoopLevel Putting thread in higher priority for Wasapi mode (lowest latency)
    02-08-2010 20:53:27.261 [  97c] CompleteConnect Success
    02-08-2010 20:53:27.295 [  97c] Pause
    02-08-2010 20:53:27.429 [  258] Run
    02-08-2010 20:53:27.429 [  258] CheckAudioClient
    02-08-2010 20:53:27.429 [  258] WAVEFORMATEX:
    02-08-2010 20:53:27.429 [  258]   nAvgBytesPerSec 192000
    02-08-2010 20:53:27.429 [  258]   nBlockAlign     4
    02-08-2010 20:53:27.429 [  258]   nChannels       2
    02-08-2010 20:53:27.429 [  258]   nSamplesPerSec  48000
    02-08-2010 20:53:27.429 [  258]   wBitsPerSample  16
    02-08-2010 20:53:27.429 [  258]   wFormatTag      1
    02-08-2010 20:53:27.429 [  258] CheckAudioClient First initialization of the audio renderer
    02-08-2010 20:53:27.429 [  258] InitAudioClient
    02-08-2010 20:53:27.430 [  258] InitAudioClient format supported
    02-08-2010 20:53:27.436 [  258] InitAudioClient Initialize failed (0x80070057)
    02-08-2010 20:53:27.436 [  258] Run: error on check audio client (0x80070057)
    02-08-2010 20:53:27.438 [  258] SetBias: 1.0000000000
    02-08-2010 20:53:27.438 [  258] SetBias - updated SoundTouch tempo
    02-08-2010 20:53:27.469 [  97c] Pause
    02-08-2010 20:53:27.470 [  97c] Stop
    02-08-2010 20:53:27.470 [  97c] Stop - releasing WASAPI resources
    02-08-2010 20:53:27.880 [  97c] MP Audio Renderer - destructor - instance 0x1207f2e8
    02-08-2010 20:53:27.880 [  97c] Stop
    02-08-2010 20:53:27.880 [ 14a4] Resampler thread - closing down - thread ID: 5284
    02-08-2010 20:53:27.880 [ 1798] Render thread - closing down - thread ID: 6040
    02-08-2010 20:53:27.880 [  97c] MP Audio Renderer - destructor - instance 0x1207f2e8 - end
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    so I reinstall again the open source driver. the play do not start.

    Code:
    02-08-2010 20:29:27.436 [ 13a4] InitAudioClient format supported
    02-08-2010 20:29:27.448 [ 13a4] InitAudioClient Initialize failed (0x80070057)

    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?

    do not work even with ac3 encoding off.

    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.
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    Anyone having the "famous" error code:

    InitAudioClient Initialize failed (0x80070057)

    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).
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    Anyone having the "famous" error code:

    InitAudioClient Initialize failed (0x80070057)

    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

    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.
     

    Users who are viewing this thread

    Top Bottom