[Approved] Fix audio player skipping Audio CD track when clicking on "Next Button" (1 Viewer)

Smeulf

Retired Team Member
  • Premium Supporter
  • October 27, 2010
    672
    454
    France
    France France
    Hi,

    As seen with Albert, there is a problem with BASS Player : when "Next" button is pressed while reading an Audio CD, a track is skipped (IE : Playing Track1, Push Next, BASSPlayer play Track 3 instead of Track2).

    basically, the OutputDevice ends because there is no more samples comming into due to the track change on the CD-Rom reader. When the OutputDevice ends, it calls a method to get the next item, as the same time the "NextItem" method is processed by the BASSPlayer main object.

    So 2 methods to get the next items were trying to act at the same moment, making a track to be skipped.

    Resolution : when NextItem button is pressed, inform the controller that the player is moving to a next item, and make the OutputDevice check is a moving operation is in progress before trying to call a next item.

    Patch attached.

    Requires "RemovableMediaManager" plugin to be properly tested.

    Cheers.

    Smeulf.

    [Edit] Patch modified. Check if the controller is already moving to the next item has moved into the PlaybackProcessor.cs, in method HandleOutputStreamEnded(). It makes more sense like it than checking it into the OutputDevice, and give avantage to process HandleOutputStreamEnded method in case there is something else to do into.
    [/Edit]
     

    Attachments

    Albert

    MP2 Developer
  • Premium Supporter
  • February 18, 2008
    1,297
    1,130
    41
    Freiburg im Breisgau, Germany
    Germany Germany
    AW: Fix audio player skipping Audio CD track when clicking on "Next Button"

    Hi Smeulf!
    Thanks very much for your work.
    I fixed the problem slightly different than you did in your patch, see the new version of the branch.

    Cheers,
    Albert
     

    Smeulf

    Retired Team Member
  • Premium Supporter
  • October 27, 2010
    672
    454
    France
    France France
    Re: AW: Fix audio player skipping Audio CD track when clicking on "Next Button"

    Hi Smeulf!
    Thanks very much for your work.
    I fixed the problem slightly different than you did in your patch, see the new version of the branch.

    Cheers,
    Albert
    Hi Albert,

    Nice code, but you introduced an another problem : now if the OutputDevice ends (ie remove the audio CD while playing it), then it don't try to play the next items anymore.

    Example of playlist :

    - Audio CD Track1
    - Audio CD Track2
    - MP3-1
    - MP3-2

    Before your patch, MP3-1 and 2 were played if the audio CD was removed. Now the BASSPlayer doesn't switch to the next item anymore, and remains at the last audio track it was playing.

    I assume this can occur with a remote windows share if it becomes unavailable, or an USB key removed.

    I'm not sure it can be solved with the counter, but maybe you'll find a way...

    Cheers.

    Smeulf.
     

    Users Who Are Viewing This Thread (Users: 0, Guests: 1)

    OP Similar threads Forum Replies Date
    framug [solved] Some changes/fix in MP1 configuration client and server Submit: code patches (MediaPortal/TV-Server/etc.) 14
    framug [Approved] Fix Irtrans config bug Submit: code patches (MediaPortal/TV-Server/etc.) 4
    W [solved] [FIXED] Survivor season 40 not automatically matching My TVSeries 1
    P [solved] ATSC subtitles not fixed yet? General 2
    framug [Rejected] Fix PowerScheduler plugin for MP2 single seat Submit: Code Patches 9
    M [Pending] Fix for Inconsistent date display in TV Guide Submit: code patches (MediaPortal/TV-Server/etc.) 1
    doskabouter [Proposal] Merge PR Fix for source directory with spaces MediaPortal 1 15
    CyberSimian Fixes for Amped aMPed 5
    CyberSimian Fixes for Amped skin MediaPortal 1 10
    Golf4 TV-Records werden als Audio-Files importiert ? Allgemeines Support- und Diskussionsforum 0
    W [solved] Incorrect audio being reported Moving Pictures 4
    404 [solved] Live TV...video and audio freeze General Support 20
    ninja 12 Audio dropouts with Dolby / DTS watch/edit Videos 12
    bta489 [solved] DVB-T2 Recordings: Sometimes no Audio after muxing with mkvmerge Tools and other software 2
    T [solved] MP2 Switch off visualisation when listening to audio....PLEASE!!! General 23
    azzuro [fixed] [WIP MP2.3] - Audio files not imported to MP MediaPortal 2 18
    S Remote button to change audio and subtitle on / off General 10
    F Audio render and font error in my logs General Support 2
    R [solved] Command / Shortcut for changing subtitles or audio Archive 5
    K Multichannel audio and subtitles for TV not properly supported General Support 4
    Glith Audio out of sync after pause. Rewind 15sec gets it into sync again. MediaPortal 1 Talk 0
    C ARC Audio Renderer Changer: wo kann man es konfigurieren? Video & DVD 15
    joecrow No Audio after MP Start/Resume from Sleep General Support 0
    C Ability to browse videos and audio by folder General 2
    Lichloathe Offline audio content General 9
    Similar threads

























    Top Bottom