Ticket #3379: cddec.2.diff

File cddec.2.diff, 1.0 KB (added by leoweppelman@…, 19 years ago)

cd-speed patch for mythmusic audio cd's - slow them down

  • cddecoder.cpp

     
    1313#include "metadata.h"
    1414
    1515#include <mythtv/mythcontext.h>
     16#include <mythtv/mythmediamonitor.h>
    1617
    1718CdDecoder::CdDecoder(const QString &file, DecoderFactory *d, QIODevice *i,
    1819                     AudioOutput *o)
     
    114115        return FALSE;
    115116    }
    116117
     118    MediaMonitor *mon = MediaMonitor::GetMediaMonitor();
     119
     120    if (mon != NULL ) {
     121        MythMediaDevice *pMedia = mon->GetMedia(devicename);
     122        if (mon->ValidateAndLock(pMedia))
     123        {
     124            // This should move to mythmedia too.....
     125            int dvdDriveSpeed = gContext->GetNumSetting("DVDDriveSpeed", 2);
     126
     127            pMedia->setSpeed(dvdDriveSpeed);
     128            mon->Unlock(pMedia);
     129        }
     130    }
     131
    117132    cdda_verbose_set(device, CDDA_MESSAGE_FORGETIT, CDDA_MESSAGE_FORGETIT);
    118133    start = cdda_track_firstsector(device, tracknum);
    119134    end = cdda_track_lastsector(device, tracknum);