MP2 - V2.1 [MP2-563] WASAPI not working for sample rates > 48 kHz (1 Viewer)

Status
Not open for further replies.

Helios61

Retired Team Member
  • Premium Supporter
  • January 30, 2008
    4,587
    871
    59
    NRW
    Home Country
    Germany Germany
    Country flag
    Can you please play such a 6ch file with a high sample rate in MP1 and post the log?
    i need to compare the results.
    Have found a solution for missing AVR. Will do some tests tomorrow morning.
     

    hwahrmann

    Development Group
  • Team MediaPortal
  • September 15, 2004
    4,623
    2,453
    Vienna, Austria
    Home Country
    Austria Austria
    Country flag
    Thanks. From a first look, i can see no difference in the flags being used to init wasapi. It is the same in MP1 and MP2.

    Can you please run the same test on MP2 and post me the client log please?
     

    Helios61

    Retired Team Member
  • Premium Supporter
  • January 30, 2008
    4,587
    871
    59
    NRW
    Home Country
    Germany Germany
    Country flag
    Logs are attached ->

    Code:
    [2017-02-22 14:13:26,802] [35558  ] [BassPlay ] [DEBUG] - BassLibrary: WASAPI device info: Name="VSX-930 (Intel(R) Display-Audio)", Driver="WASAPI", Channels=8, MinRate=32000, MaxRate=192000, Latency=0ms
    [2017-02-22 14:13:26,803] [35559  ] [BassPlay ] [DEBUG] - BassLibrary: BASS: ---------------------------------------------
    [2017-02-22 14:13:26,803] [35559  ] [BassPlay ] [DEBUG] - BassLibrary: BASS: Buffer Length: 25344
    [2017-02-22 14:13:26,803] [35559  ] [BassPlay ] [DEBUG] - BassLibrary: BASS: Channels: 6
    [2017-02-22 14:13:26,804] [35560  ] [BassPlay ] [DEBUG] - BassLibrary: BASS: Frequency: 48000
    [2017-02-22 14:13:26,804] [35560  ] [BassPlay ] [DEBUG] - BassLibrary: BASS: Format: BASS_WASAPI_FORMAT_FLOAT
    [2017-02-22 14:13:26,804] [35560  ] [BassPlay ] [DEBUG] - BassLibrary: BASS: InitFlags: BASS_WASAPI_AUTOFORMAT, BASS_WASAPI_BUFFER, BASS_WASAPI_EVENT
    [2017-02-22 14:13:26,804] [35560  ] [BassPlay ] [DEBUG] - BassLibrary: BASS: Exclusive: False
    [2017-02-22 14:13:26,805] [35561  ] [BassPlay ] [DEBUG] - BassLibrary: BASS: ---------------------------------------------
    [2017-02-22 14:13:26,805] [35561  ] [BassPlay ] [INFO ] - BassLibrary: BASS: WASAPI Device successfully initialised
    [2017-02-22 14:13:26,805] [35561  ] [BassPlay ] [DEBUG] - BassLibrary: BASS: Creating new 6 channel mixer for frequency 48000
    [2017-02-22 14:13:26,805] [35561  ] [BassPlay ] [DEBUG] - BassLibrary: Stream type: BASS_CTYPE_STREAM_MIXER

    IMO the issue is related to the not working exclusive mode. MP2 falls back to shared mode.

    The difference:
    MP1
    Code:
    BASS: Format: BASS_WASAPI_FORMAT_24BIT

    MP2
    Code:
    BASS: Format: BASS_WASAPI_FORMAT_FLOAT
     
    Last edited:

    hwahrmann

    Development Group
  • Team MediaPortal
  • September 15, 2004
    4,623
    2,453
    Vienna, Austria
    Home Country
    Austria Austria
    Country flag
    That's not the problem, because we are already failing when trying to init the wasapi device.

    MP1:
    Code:
    if (BassWasapi.BASS_WASAPI_Init(_bassPlayer.DeviceNumber, stream.ChannelInfo.freq, outputChannels,
                                          initFlags | BASSWASAPIInit.BASS_WASAPI_BUFFER, Convert.ToSingle(Config.BufferingMs / 1000.0), 0f, _wasapiProc, IntPtr.Zero))
    .....

    MP2:
    Code:
    bool result = BassWasapi.BASS_WASAPI_Init(_deviceNo, _inputStream.SampleRate, _inputStream.Channels, _flags, 0.5f, 0f, _streamWriteProcDelegate, IntPtr.Zero);

    They are both using the same device number, the sample rate and number of channels from the stream, which we see in the logs.

    And also the same flags are being used.
     

    hwahrmann

    Development Group
  • Team MediaPortal
  • September 15, 2004
    4,623
    2,453
    Vienna, Austria
    Home Country
    Austria Austria
    Country flag
    @Helios61: I think i found it. it is the Buffer size, which seems to be too big.
    In MP2 we have a fixed buffer size of 500ms, whereas in MP1 it is configureable.

    I guess, when you set the buffer size in MP1 to 500ms, you will end up with the same problem as in MP2.
     

    hwahrmann

    Development Group
  • Team MediaPortal
  • September 15, 2004
    4,623
    2,453
    Vienna, Austria
    Home Country
    Austria Austria
    Country flag
    Looking at the Bass forum. This seems to be a problem of 2.4.0.0, which we are using inside MP.
    I am just about to update the latest Bass versions in our nuget, as i promised the MP1 guys to do so.

    We shall be able to test then this case against the new library
     

    HTPCSourcer

    Retired Team Member
  • Premium Supporter
  • May 16, 2008
    11,431
    2,334
    Home Country
    Germany Germany
    Country flag
    Maybe it is a good idea, if we make the buffer size configureable.
    That's quite some work.

    Have you identified a value that is working for you?
     

    Helios61

    Retired Team Member
  • Premium Supporter
  • January 30, 2008
    4,587
    871
    59
    NRW
    Home Country
    Germany Germany
    Country flag
    I think i found it. it is the Buffer size, which seems to be too big.
    In MP2 we have a fixed buffer size of 500ms, whereas in MP1 it is configureable.
    Have configured the same buffer size (221ms) as in MP1, unfortunately the same issue. Logs are attached.
    I guess, when you set the buffer size in MP1 to 500ms, you will end up with the same problem as in MP2.
    With buffer size 500ms playback in MP1 fails completely. Logs are attached.
    That's quite some work.
    But i think, it makes sense. OK, it isn't a big task to edit the .xml file, but i think for the most cases 500ms is to much.
     
    Last edited:
    Status
    Not open for further replies.

    Users who are viewing this thread

    Similar threads

    • Locked
    It would be great if you then posted a comment in your bug thread. I will mark the thread as "fixed", assuming that the change has made (or will make) its way into the master.
    It would be great if you then posted a comment in your bug thread. I will mark the thread as "fixed", assuming that the change has...
    Hi, i've noticed, that MP2 crashed to desktop, if you try to play an audiofile after changing WASAPI exclusiv audio device...
    Replies
    24
    Views
    3K
    MP1 MP2 No AC3 sound ... DE
    @fanol Thanks for providing the log files. However they contain only limited detail. Could you please collect new log files, and this time use the Watchdog tool with option 1 or 2 ("report a bug...") to do it. The Watchdog tool is the preferred method/source for collecting log files. Please use it whenever you can. General...
    @fanol Thanks for providing the log files. However they contain only limited detail. Could you please collect new log files, and...
    Hi! I start to play, and there is no sound. Established LAV 0.68 everywhere. On the other formats and movies is no such problem. I...
    Replies
    84
    Views
    11K
    Нет, ничего не делал, иногда такое у меня бывает, но помогало всегда выключение компа. Вчера ничего не помогло. Но интереснее то что, включаю CC Catch и все нормально. Любое другое из того что пробовал выдает такую ошибку. :( LAV использую только в видео, но там со звуком проблем нет. Проблема именно в WASAPI Exclusive, если...
    Нет, ничего не делал, иногда такое у меня бывает, но помогало всегда выключение компа. Вчера ничего не помогло. Но интереснее то...
    Mediaportal 1.7.1 подключен через HDMI к Pioneer VSX-828, системные звуки Windows слышно и все работает, фильмы и видеоклипы так...
    Replies
    19
    Views
    3K
    • Locked
    I'll close this thread since audio renderer is now part of the MP release (1.3.0): Any audio renderer bugs should be reported in a separate threads, just like other bugs have been handled during the years Any new audio renderer development / public testing will take place in new thread(s) Big thanks for everyone who has been...
    I'll close this thread since audio renderer is now part of the MP release (1.3.0): Any audio renderer bugs should be reported in...
    Beta warning - Do not use if you aren't willing to take part into the beta testing! Please note that there is currently only...
    Replies
    215
    Views
    40K
    Yep, that fixed the problem for me ... at least for watching the "The Event" episode 9 in 720p tonight. I maintained 2% but set timeout to 30 secs. I did not have a single stutter during the whole show. :thx:
    Yep, that fixed the problem for me ... at least for watching the "The Event" episode 9 in 720p tonight. I maintained 2% but set...
    Hi, I sometimes get the error no URL when trying to play some files from svtplay with onlinevideos 0.25. It has worked sometimes...
    Replies
    5
    Views
    1K
    Top Bottom