BassPlayer: Adding WASAPI support | Page 2

Discussion in 'Plugin Development' started by morpheus_xx, March 23, 2014.

  1. morpheus_xx
    • Team MediaPortal

    morpheus_xx Lead Dev MP2

    Joined:
    March 24, 2007
    Messages:
    10,856
    Likes Received:
    4,680
    Ratings:
    +6,704 / 11
    Home Country:
    Germany Germany
    Show System Specs
    Yes, this was the reason :D Shared mode requires a mixer stream, now playback works fine!!!

    While implementing this in MP2, I found that MP1 seem to leak GCHandles: they are created in many places but are not freed.


     
    • Thank You! Thank You! x 2
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. BassFan

    BassFan Guest

    Ratings:
    +0 / 0
    Puhh... :)
    that is good then happy with Wasapi to.

    Thanks for the info.. should be a part for @hwahrmann to. :)
    i'm work only on Visualization stuff :(

    greets
     
    Last edited by a moderator: March 25, 2014
  4. morpheus_xx
    • Team MediaPortal

    morpheus_xx Lead Dev MP2

    Joined:
    March 24, 2007
    Messages:
    10,856
    Likes Received:
    4,680
    Ratings:
    +6,704 / 11
    Home Country:
    Germany Germany
    Show System Specs
    Progress is good now, I'm working on configuration (selection of DirectSound/WASAPI, device selection, exclusive mode yes/no).
     
    • Like Like x 4
  5. morpheus_xx
    • Team MediaPortal

    morpheus_xx Lead Dev MP2

    Joined:
    March 24, 2007
    Messages:
    10,856
    Likes Received:
    4,680
    Ratings:
    +6,704 / 11
    Home Country:
    Germany Germany
    Show System Specs
    Good news! First post is updated with a test plugin! It can be used with any MP2 Alpha 4 or newer build.

    Configuration and playback works fine (both shared and exclusive mode). Also "gapless playback" works here!

    Please test this and report results :D
     
    • Like Like x 4
  6. Lehmden
    • Team MediaPortal

    Lehmden Retired Team Member

    Joined:
    December 17, 2010
    Messages:
    11,723
    Likes Received:
    2,137
    Gender:
    Male
    Location:
    Lehmden
    Ratings:
    +3,587 / 28
    Home Country:
    Germany Germany
    Show System Specs
    Hi.
    Tested it and I'm excited. Normal "CD Quality"- MP3 are played at a notable higher quality now. HiRes Audio Files are played as much as the hardware can deliver. No bugs so far. Really great job.(y)
    Only downside is the lost of cross fading but that's the price we have to pay for pure sound...
     
    • Like Like x 2
  7. Helios61
    • Team MediaPortal

    Helios61 Retired Team Member

    Joined:
    January 30, 2008
    Messages:
    4,587
    Likes Received:
    584
    Gender:
    Male
    Location:
    NRW
    Ratings:
    +897 / 4
    Home Country:
    Germany Germany
    Show System Specs
    Hi!

    First, big Thanks for this great job, i'm really impressed. Made some quick tests and most is working great and as exspected (especially gapless playback). Only two issues i've noticed:
    1. Multichannel files with samplingrate >48 KHz will be resampled to 48 KHz. It's odd, playback of 2ch/24bit/96KHz is working fine! Log is attached (Client.rar).
    2. Channel mapping of 5.0 files is wrong (channels.rar):
    • L -> L
    • C -> C
    • R -> R
    • RR -> LFE
    • RL -> RR
    Hier scheint der Fehler zu liegen ->
    Code (Text):
    1. [2014-03-29 08:50:47,066] [22768  ] [Thread9  ] [INFO ] - BassPlayer: Stream info: FLAC, 88200Hz, 4.1, 24bit
    Bass player mapps 4.1 channels, instead of 5.0!

    Again big Thanks
    Helios
     

    Attached Files:

    • Client.rar
      File size:
      13.5 KB
      Uploaded:
      March 29, 2014
      Views:
      138
    • channels.rar
      File size:
      11.4 KB
      Uploaded:
      March 29, 2014
      Views:
      138
    Last edited: March 29, 2014
  8. morpheus_xx
    • Team MediaPortal

    morpheus_xx Lead Dev MP2

    Joined:
    March 24, 2007
    Messages:
    10,856
    Likes Received:
    4,680
    Ratings:
    +6,704 / 11
    Home Country:
    Germany Germany
    Show System Specs
    I have same result here: although bass tells me this is a supported format, Init() call will fail Then it switches back to shared mode.
    Is "Lautsprecher (Realtek High Definition Audio)" the right device?

    I'm currently working on the problem, that playback end is not working in shared mode: I don't get an event that input stream has ended, so it plays silence for infinity, although MP2 player shows "stopped".
     
  9. Helios61
    • Team MediaPortal

    Helios61 Retired Team Member

    Joined:
    January 30, 2008
    Messages:
    4,587
    Likes Received:
    584
    Gender:
    Male
    Location:
    NRW
    Ratings:
    +897 / 4
    Home Country:
    Germany Germany
    Show System Specs
    No, i've just seen this log entry too. Configured is 'LG TV (Intel(R) Display-Audio)'!
     
  10. morpheus_xx
    • Team MediaPortal

    morpheus_xx Lead Dev MP2

    Joined:
    March 24, 2007
    Messages:
    10,856
    Likes Received:
    4,680
    Ratings:
    +6,704 / 11
    Home Country:
    Germany Germany
    Show System Specs
    Device selection for Shared mode is fixed now. New build in first post!

    @BassFan @hwahrmann I still fighting an issue with the Mixer in shared mode. While in all other cases the stream end is handled correctly (DirectSound, WASAPI exclusive), the shared mode doesn't seem stop playback.

    I tried to attach handlers for Stream end like:
    Bass.BASS_ChannelSetSync(stream.Handle, BASSSync.BASS_SYNC_FREE | BASSSync.BASS_SYNC_MIXTIME, 0, OnPlaybackEnd,...

    But this doesn't work in current code: no callback happens and mixer will be read after finish. How do I get noticed of playback end in this case?
     
    Last edited: March 29, 2014
  11. BassFan

    BassFan Guest

    Ratings:
    +0 / 0
    if your use mixer then your should work with mixer not with stream.
    this can not fired the sync proc if your replace mixer stream with a normal stream handle

    also is that
    Code (Text):
    1. stream.Handle
    a mixer handle ?
    if not! then that will never fired if the stream which playing a mixer stream handle.

    your work with mixer_handle ..
    and create s sync for normal stream.handle?

    sorry not understand the naming issues :confused:;)
    _mixer for Mixter stream
    _stream for normal Stream

    greets
     
    Last edited by a moderator: March 29, 2014
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!