Gapless Playback | Page 4

Discussion in 'Listen Music' started by TranceManNZ, January 12, 2013.

  1. hwahrmann
    • Team MediaPortal

    hwahrmann Development Group

    Joined:
    September 15, 2004
    Messages:
    4,495
    Likes Received:
    1,638
    Gender:
    Male
    Location:
    Vienna, Austria
    Ratings:
    +2,264 / 1
    Home Country:
    Austria Austria
    should be set to zero, which means gapless playback


     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. DragonQ

    DragonQ Portal Pro

    Joined:
    August 30, 2011
    Messages:
    644
    Likes Received:
    61
    Ratings:
    +74 / 2
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    Not really related to this thread but I found another bug in Music playback. With WASAPI, my 96 kHz, 24-bit, 5.1 FLAC files play 3-4 times as fast as they should. Log attached, and I've uploaded a sample here since it's 48 MiB. Happens with both my HTPC (connected to an AVR) and my desktop (normal speakers).

    Another issue is that WASAPI doesn't seem to "release" the audio once MediaPortal closes. For example, if you open Foobar in DirectSound mode, pause it, then open MediaPortal and play something in Music via WASAPI, then close MediaPortal, Foobar won't produce sound any more.
     

    Attached Files:

    Last edited: July 9, 2013
  4. DragonQ

    DragonQ Portal Pro

    Joined:
    August 30, 2011
    Messages:
    644
    Likes Received:
    61
    Ratings:
    +74 / 2
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    I've set it to zero in all three places I found reference to gapless playback and rebuilt MediaPortal. It does seem to get rid of the fade-in when starting a track, but it breaks as soon as the track ends and a new track is set to start. There's no crash but the log indicates that the player stops as soon as the second track starts:

    Code (Text):
    1. g_Player.Process() player stopped...
    I can't see why though.

    The other thing is that when the next track starts, the WASAPI device is stopped, the mixer stream is disposed and a new BASS audio stream is created. This does not sound like a chain that supports gapless playback - a quick google suggests that BASS_Mixer_StreamAddChannel needs to be used for this.
     
    Last edited: July 10, 2013
    • Like Like x 1
  5. tourettes
    • Team MediaPortal

    tourettes Retired Team Member

    Joined:
    January 7, 2005
    Messages:
    17,301
    Likes Received:
    4,595
    Ratings:
    +4,810 / 3
    Yep, WASAPI device cannot be stopped since that itself will already introduce a gap in the playback (close + init takes more than 0 ms).
     
  6. TranceManNZ

    TranceManNZ Portal Pro

    Joined:
    July 30, 2006
    Messages:
    209
    Likes Received:
    15
    Ratings:
    +20 / 0
    I just want it work with a ripped cd (mp3+cue). If you ripped a DJ mixed CD, the correct way is to rip this to a single mp3 file with a cue file. The audio player should read the cue file for the track indexes. This part works fine in MP but the player still creates a small gap.

    I am sure a few years ago the player never had this issue. It all used to work fine.
     
  7. DragonQ

    DragonQ Portal Pro

    Joined:
    August 30, 2011
    Messages:
    644
    Likes Received:
    61
    Ratings:
    +74 / 2
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    Well no, the "correct" way, assuming you want an actual copy of the disc on your HDD, is to use a lossless format. It doesn't matter whether you use separate files or a CUE sheet, gapless playback should work in the same way.

    Looking at the code, I find it hard to believe that gapless playback has ever worked with the BASS engine, but maybe MediaPortal used to use a different engine.

    After doing a bit of digging, it's possible that this issue is related to this already-fixed issue from 1.4.0 pre-release. I can't figure out how to look up the code changes for this fix though. :/
     
    Last edited: July 10, 2013
  8. TranceManNZ

    TranceManNZ Portal Pro

    Joined:
    July 30, 2006
    Messages:
    209
    Likes Received:
    15
    Ratings:
    +20 / 0

    Well I guess this is correct also. I don't have unlimited space so I compress my CD's to MP3 + CUE. Also, If I purchase say a Ministry Of Sound mixed album off iTunes it comes in separate tracks. I guess if gapless playback worked correctly these files would play properly.
     
    Last edited: July 10, 2013
  9. DragonQ

    DragonQ Portal Pro

    Joined:
    August 30, 2011
    Messages:
    644
    Likes Received:
    61
    Ratings:
    +74 / 2
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    Yes, if they were mastered properly. Playing them in Foobar, Winamp, etc. will demonstrate this.
     
  10. hwahrmann
    • Team MediaPortal

    hwahrmann Development Group

    Joined:
    September 15, 2004
    Messages:
    4,495
    Likes Received:
    1,638
    Gender:
    Male
    Location:
    Vienna, Austria
    Ratings:
    +2,264 / 1
    Home Country:
    Austria Austria
    Ok. A first try.
    Everyone who needs Gapless Playback should try this and report back results:
    http://tinyurl.com/ploy8yw

    It is a full installer based on MP 1.4 with changes made to how Gapless Playback is handled
     
    • Like Like x 3
  11. hwahrmann
    • Team MediaPortal

    hwahrmann Development Group

    Joined:
    September 15, 2004
    Messages:
    4,495
    Likes Received:
    1,638
    Gender:
    Male
    Location:
    Vienna, Austria
    Ratings:
    +2,264 / 1
    Home Country:
    Austria Austria
    Well it isn't enough to just set everything to zero.
    Some other things need to be done as well to make this work.

    And a Mixer is only recreated when the next song has a different sample rate or number of channels than the prebious.

    Believe me not everything is implemented bad.
     
    • Like Like x 4
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!