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

Status
Not open for further replies.

morpheus_xx

Lead Dev MP2
  • Team MediaPortal
  • March 24, 2007
    11,777
    7,127
    Home Country
    Germany Germany
    Country flag
    Broken WASAPI exclusive mode for sampling rates > 48Khz
    I tried to reproduce this issue but could not yet. In mean time I have bought a new AVR which supports higher rates, so in principle I should be able to reproduce.

    Here is what I tested (was it a sample file from you?):

    [2017-01-01 17:37:16,323] [452779 ] [Thread113] [INFO ] - BassLibrary: Preparing for playback: 'BassAudioFileInputSource: D:\MusicTest\01 - Destiny's Child - Independent woman no. 1.dsf'
    [2017-01-01 17:37:16,324] [452780 ] [BassPlay ] [DEBUG] - BassLibrary: Playing next input source 'BassAudioFileInputSource: D:\MusicTest\01 - Destiny's Child - Independent woman no. 1.dsf'
    [2017-01-01 17:37:16,327] [452783 ] [BassPlay ] [DEBUG] - BassLibrary: PlaybackSession: Creating output stream
    [2017-01-01 17:37:16,328] [452784 ] [BassPlay ] [DEBUG] - BassLibrary: Stream type: BASS_CTYPE_STREAM
    [2017-01-01 17:37:16,332] [452788 ] [BassPlay ] [DEBUG] - BassLibrary: Stream type: BASS_CTYPE_STREAM
    [2017-01-01 17:37:16,325] [452781 ] [AMQ 'UPnPRendererPlugin'] [DEBUG] - Player Started
    [2017-01-01 17:37:16,335] [452791 ] [BassPlay ] [DEBUG] - BassLibrary: Stream type: BASS_CTYPE_STREAM
    [2017-01-01 17:37:16,339] [452795 ] [BassPlay ] [DEBUG] - BassLibrary: Stream type: BASS_CTYPE_STREAM_MIXER
    [2017-01-01 17:37:16,388] [452844 ] [BassPlay ] [DEBUG] - BassLibrary: OutputDeviceManager.SetInputStream()
    [2017-01-01 17:37:16,390] [452846 ] [BassPlay ] [DEBUG] - BassLibrary: OutputDeviceManager.ResetInputStream()
    [2017-01-01 17:37:16,391] [452847 ] [BassPlay ] [DEBUG] - BassLibrary: Instantiating output device
    [2017-01-01 17:37:16,653] [453109 ] [BassPlay ] [INFO ] - BassLibrary: Initializing WASAPI device 'VSX-S510 (Intel(R) Display-Audio)' (device no 20)
    [2017-01-01 17:37:16,654] [453110 ] [BassPlay ] [DEBUG] - BassLibrary: Calling SetInputStream()
    [2017-01-01 17:37:16,667] [453123 ] [BassPlay ] [DEBUG] - BassLibrary: BASS: Try to init WASAPI with a samplerate of 88200 and 6 channels
    [2017-01-01 17:37:16,706] [453163 ] [BassPlay ] [WARN ] - BassLibrary: BASS: Failed to initialize WASAPI exclusive mode for samplerate of 88200 and 6 channels. Trying fallback to shared mode.
    [2017-01-01 17:37:16,708] [453165 ] [BassPlay ] [DEBUG] - BassLibrary: BASS: Init WASAPI shared mode with Event driven system enabled.
    [2017-01-01 17:37:16,709] [453166 ] [BassPlay ] [DEBUG] - BassLibrary: BASS: Try to init WASAPI with a samplerate of 88200 and 6 channels
    [2017-01-01 17:37:16,762] [453218 ] [BassPlay ] [DEBUG] - BassLibrary: WASAPI device info: Name="VSX-S510 (Intel(R) Display-Audio)", Driver="WASAPI", Channels=8, MinRate=32000, MaxRate=192000, Latency=0ms
    [2017-01-01 17:37:16,763] [453219 ] [BassPlay ] [DEBUG] - BassLibrary: BASS: ---------------------------------------------
    [2017-01-01 17:37:16,765] [453221 ] [BassPlay ] [DEBUG] - BassLibrary: BASS: Buffer Length: 50688
    [2017-01-01 17:37:16,766] [453222 ] [BassPlay ] [DEBUG] - BassLibrary: BASS: Channels: 6
    [2017-01-01 17:37:16,767] [453223 ] [BassPlay ] [DEBUG] - BassLibrary: BASS: Frequency: 96000
    [2017-01-01 17:37:16,769] [453225 ] [BassPlay ] [DEBUG] - BassLibrary: BASS: Format: BASS_WASAPI_FORMAT_FLOAT
    [2017-01-01 17:37:16,770] [453226 ] [BassPlay ] [DEBUG] - BassLibrary: BASS: InitFlags: BASS_WASAPI_AUTOFORMAT, BASS_WASAPI_BUFFER, BASS_WASAPI_EVENT
    [2017-01-01 17:37:16,771] [453227 ] [BassPlay ] [DEBUG] - BassLibrary: BASS: Exclusive: False
    [2017-01-01 17:37:16,772] [453228 ] [BassPlay ] [DEBUG] - BassLibrary: BASS: ---------------------------------------------
    [2017-01-01 17:37:16,774] [453230 ] [BassPlay ] [INFO ] - BassLibrary: BASS: WASAPI Device successfully initialised
    [2017-01-01 17:37:16,775] [453231 ] [BassPlay ] [DEBUG] - BassLibrary: BASS: Creating new 6 channel mixer for frequency 96000
    [2017-01-01 17:37:16,777] [453233 ] [BassPlay ] [DEBUG] - BassLibrary: Stream type: BASS_CTYPE_STREAM_MIXER

    My current findings (remember: new hardware and not looked into this since long time):
    • WASAPI exclusive mode was not sucessfully enabled for 88.2 kHz.
    • Windows sound test does not output sample sound when using 88.2 kHz as well, so I guess this rate is not supported by my AVR
    • 2nd try is then the shared mode using the mixer. Here the default rate and the channel configuration of Windows is used. As I also changed my HTPC mainboard, I didn't change those settings again (where default 48kHz/2ch).
    Can you provide me clear steps how I can reproduce the downsampling issue? Best would also be to provide a matching testfile, from hardware side I should be able to test now.

    The AVR lists following modes as supported (88.2 not working though):
    [2017-01-01 17:30:52,906] [69362 ] [BassPlay ] [DEBUG] - BassLibrary: Collecting device info
    [2017-01-01 17:30:52,927] [69384 ] [BassPlay ] [DEBUG] - BassLibrary: Check BASS_WASAPI_EXCLUSIVE mode
    [2017-01-01 17:30:53,013] [69469 ] [BassPlay ] [DEBUG] - BassLibrary: - 32000 Hz / 2 ch: BASS_WASAPI_FORMAT_24BIT
    [2017-01-01 17:30:53,027] [69483 ] [BassPlay ] [DEBUG] - BassLibrary: - 32000 Hz / 4 ch: BASS_WASAPI_FORMAT_24BIT
    [2017-01-01 17:30:53,041] [69498 ] [BassPlay ] [DEBUG] - BassLibrary: - 32000 Hz / 6 ch: BASS_WASAPI_FORMAT_24BIT
    [2017-01-01 17:30:53,054] [69511 ] [BassPlay ] [DEBUG] - BassLibrary: - 32000 Hz / 8 ch: BASS_WASAPI_FORMAT_24BIT
    [2017-01-01 17:30:53,074] [69530 ] [BassPlay ] [DEBUG] - BassLibrary: - 44100 Hz / 2 ch: BASS_WASAPI_FORMAT_24BIT
    [2017-01-01 17:30:53,087] [69543 ] [BassPlay ] [DEBUG] - BassLibrary: - 44100 Hz / 4 ch: BASS_WASAPI_FORMAT_24BIT
    [2017-01-01 17:30:53,102] [69558 ] [BassPlay ] [DEBUG] - BassLibrary: - 44100 Hz / 6 ch: BASS_WASAPI_FORMAT_24BIT
    [2017-01-01 17:30:53,114] [69570 ] [BassPlay ] [DEBUG] - BassLibrary: - 44100 Hz / 8 ch: BASS_WASAPI_FORMAT_24BIT
    [2017-01-01 17:30:53,134] [69590 ] [BassPlay ] [DEBUG] - BassLibrary: - 48000 Hz / 2 ch: BASS_WASAPI_FORMAT_24BIT
    [2017-01-01 17:30:53,148] [69604 ] [BassPlay ] [DEBUG] - BassLibrary: - 48000 Hz / 4 ch: BASS_WASAPI_FORMAT_24BIT
    [2017-01-01 17:30:53,220] [69676 ] [BassPlay ] [DEBUG] - BassLibrary: - 48000 Hz / 6 ch: BASS_WASAPI_FORMAT_24BIT
    [2017-01-01 17:30:53,234] [69690 ] [BassPlay ] [DEBUG] - BassLibrary: - 48000 Hz / 8 ch: BASS_WASAPI_FORMAT_24BIT
    [2017-01-01 17:30:53,253] [69709 ] [BassPlay ] [DEBUG] - BassLibrary: - 88200 Hz / 2 ch: BASS_WASAPI_FORMAT_24BIT
    [2017-01-01 17:30:53,266] [69723 ] [BassPlay ] [DEBUG] - BassLibrary: - 88200 Hz / 4 ch: BASS_WASAPI_FORMAT_24BIT
    [2017-01-01 17:30:53,280] [69737 ] [BassPlay ] [DEBUG] - BassLibrary: - 88200 Hz / 6 ch: BASS_WASAPI_FORMAT_24BIT
    [2017-01-01 17:30:53,294] [69750 ] [BassPlay ] [DEBUG] - BassLibrary: - 88200 Hz / 8 ch: BASS_WASAPI_FORMAT_24BIT
    [2017-01-01 17:30:53,313] [69769 ] [BassPlay ] [DEBUG] - BassLibrary: - 96000 Hz / 2 ch: BASS_WASAPI_FORMAT_24BIT
    [2017-01-01 17:30:53,326] [69782 ] [BassPlay ] [DEBUG] - BassLibrary: - 96000 Hz / 4 ch: BASS_WASAPI_FORMAT_24BIT
    [2017-01-01 17:30:53,341] [69797 ] [BassPlay ] [DEBUG] - BassLibrary: - 96000 Hz / 6 ch: BASS_WASAPI_FORMAT_24BIT
    [2017-01-01 17:30:53,353] [69809 ] [BassPlay ] [DEBUG] - BassLibrary: - 96000 Hz / 8 ch: BASS_WASAPI_FORMAT_24BIT
    [2017-01-01 17:30:53,375] [69831 ] [BassPlay ] [DEBUG] - BassLibrary: - 192000 Hz / 2 ch: BASS_WASAPI_FORMAT_16BIT
    [2017-01-01 17:30:53,391] [69848 ] [BassPlay ] [DEBUG] - BassLibrary: - 192000 Hz / 4 ch: BASS_WASAPI_FORMAT_16BIT
    [2017-01-01 17:30:53,407] [69863 ] [BassPlay ] [DEBUG] - BassLibrary: - 192000 Hz / 6 ch: BASS_WASAPI_FORMAT_16BIT
    [2017-01-01 17:30:53,422] [69878 ] [BassPlay ] [DEBUG] - BassLibrary: - 192000 Hz / 8 ch: BASS_WASAPI_FORMAT_16BIT
    [2017-01-01 17:30:53,423] [69879 ] [BassPlay ] [DEBUG] - BassLibrary: Check BASS_WASAPI_SHARED mode
    [2017-01-01 17:30:53,483] [69940 ] [BassPlay ] [DEBUG] - BassLibrary: - 48000 Hz / 2 ch: BASS_WASAPI_FORMAT_FLOAT

    EDIT HTPCSourcer:
    @Helios61 , posting moved into dedicated bug thread.
     
    Last edited by a moderator:

    Helios61

    Retired Team Member
  • Premium Supporter
  • January 30, 2008
    4,587
    871
    59
    NRW
    Home Country
    Germany Germany
    Country flag
    I will take a look at this tomorrow afternoon.
     

    Helios61

    Retired Team Member
  • Premium Supporter
  • January 30, 2008
    4,587
    871
    59
    NRW
    Home Country
    Germany Germany
    Country flag
    Hi, have tried to test some files. Unfortunately playback of audiofiles completely fails (WASAPI & DS). i've noticed this error in logfile:

    Code:
    [2017-01-02 14:17:33,415] [54597  ] [BassPlay ] [ERROR] - Exception in player main thread
    System.Reflection.TargetInvocationException: Ein Aufrufziel hat einen Ausnahmefehler verursacht. ---> MediaPortal.Extensions.BassLibraries.BassLibraryException: Error calling function BASS_WASAPI_Init(): BASS_ERROR_DRIVER
       bei MediaPortal.UI.Players.BassPlayer.OutputDevices.WASAPIOutputDevice.SetInputStream(BassStream stream, Boolean passThrough)
       bei MediaPortal.UI.Players.BassPlayer.PlayerComponents.OutputDeviceManager.SetInputStream(BassStream stream, Boolean passThrough)
       bei MediaPortal.UI.Players.BassPlayer.PlayerComponents.PlaybackSession.Initialize(IInputSource inputSource)
       bei MediaPortal.UI.Players.BassPlayer.PlayerComponents.PlaybackSession.Create(Controller controller)
       bei MediaPortal.UI.Players.BassPlayer.PlayerComponents.PlaybackProcessor.MoveToNextInputSource_Sync()
       --- Ende der internen Ausnahmestapelüberwachung ---
       bei System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
       bei System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
       bei System.Delegate.DynamicInvokeImpl(Object[] args)
       bei MediaPortal.UI.Players.BassPlayer.Controller.PlayerThreadMain()

    Logs are attached.
     

    morpheus_xx

    Lead Dev MP2
  • Team MediaPortal
  • March 24, 2007
    11,777
    7,127
    Home Country
    Germany Germany
    Country flag
    • Thread starter
    • Moderator
    • #4
    Did you select proper devices inside configuration before?
    Can you post more details on used files (format, bitrate etc)
     

    HTPCSourcer

    Retired Team Member
  • Premium Supporter
  • May 16, 2008
    11,431
    2,334
    Home Country
    Germany Germany
    Country flag
    Hi,

    I looked at it and didn't have problems to play my own files here. Could you provide a test sample so that we all deal with the very same test data when testing?

    One question about your own setup: if the rip is 44.1 kHz, i.e. CD standard, Wasapi would not convert this into a higher sample rate for replay on your AVR - unless you have forced Windows to always use a higher rate. I've read somewhere that Wasapi was having some issues in such situations although this may be outdated.
     

    Helios61

    Retired Team Member
  • Premium Supporter
  • January 30, 2008
    4,587
    871
    59
    NRW
    Home Country
    Germany Germany
    Country flag
    Did you select proper devices inside configuration before?
    I do, but i think the question goes into the right direction. I've noticed this issue first after switching on my TV (HDMI Connection to AVR). At this moment sounddevice changed in Windows from AVR to TV (with the same sound specifications, sample rate, bit depht, channel layout).
    For testing i will find time tomorrow.

    One question about your own setup: if the rip is 44.1 kHz, i.e. CD standard, Wasapi would not convert this into a higher sample rate for replay on your AVR - unless you have forced Windows to always use a higher rate.
    Yes, thats right. WASAPI exclusive should output the stream "bitperfect" without Windows Mixxer.

    I looked at it and didn't have problems to play my own files here. Could you provide a test sample so that we all deal with the very same test data when testing?
    The test above was a simple CD rip. Another testsamples i've uploadet already to our ftp server and you will find a lot of great testfiles at http://www.2l.no/hires/index.html.
     

    HTPCSourcer

    Retired Team Member
  • Premium Supporter
  • May 16, 2008
    11,431
    2,334
    Home Country
    Germany Germany
    Country flag

    HTPCSourcer

    Retired Team Member
  • Premium Supporter
  • May 16, 2008
    11,431
    2,334
    Home Country
    Germany Germany
    Country flag
    Obviously my own test system is not doing complete bitstream as it only has to loudspeakers attached to it. This is how my player settings look like though:

    Wasapi.JPG
     

    Helios61

    Retired Team Member
  • Premium Supporter
  • January 30, 2008
    4,587
    871
    59
    NRW
    Home Country
    Germany Germany
    Country flag
    So I would rather assume your problems to be linked to your system setup.
    No, i do not think so, because playback is working fine in Musicbee (the same BASS Engine as in MP2) and Foobar2000.
     
    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