[rubyripper] push by boukewou...@gmail.com - Fix the cuesheet calculation for single rips (issue 553) on 2013-01-02 20:16 GMT

2 views
Skip to first unread message

rubyr...@googlecode.com

unread,
Jan 2, 2013, 3:17:01 PM1/2/13
to rubyrippe...@googlegroups.com
Revision: 8bb46bd02291
Author: Bouke Woudstra <boukew...@gmail.com>
Date: Wed Jan 2 12:15:42 2013
Log: Fix the cuesheet calculation for single rips (issue 553)

http://code.google.com/p/rubyripper/source/detail?r=8bb46bd02291

Modified:
/lib/rubyripper/disc/cuesheet.rb
/spec/disc/cuesheet_spec.rb

=======================================
--- /lib/rubyripper/disc/cuesheet.rb Thu Dec 27 11:54:10 2012
+++ /lib/rubyripper/disc/cuesheet.rb Wed Jan 2 12:15:42 2013
@@ -145,8 +145,8 @@

def printIndexImageOtherTracks(track)
if @cdrdao.getPregapSectors(track) > 0
- printIndexLine('00', @disc.getStartSector(track))
- printIndexLine('01', @disc.getStartSector(track) +
@cdrdao.getPregapSectors(track))
+ printIndexLine('00', @disc.getStartSector(track) -
@cdrdao.getPregapSectors(track))
+ printIndexLine('01', @disc.getStartSector(track))
else # no pregap
printIndexLine('01', @disc.getStartSector(track))
end
=======================================
--- /spec/disc/cuesheet_spec.rb Thu Dec 27 11:54:10 2012
+++ /spec/disc/cuesheet_spec.rb Wed Jan 2 12:15:42 2013
@@ -120,12 +120,14 @@
cue.cuesheet.should == @cuesheet
end

+ # The reported start sectors in the TOC are always after the pregap.
+ # The zero index therefore is the startindex of the track minus the
pregap.
it "should write a zero index for tracks > 1 with a pregap" do
prefs.stub!(:ripHiddenAudio).and_return true
cdrdao.stub!(:getPregapSectors).and_return 0
cdrdao.stub!(:getPregapSectors).with(2).and_return 100
- @cuesheet.insert(8, ' INDEX 00 00:03:00')
- @cuesheet[9] = ' INDEX 01 00:04:25'
+ @cuesheet.insert(8, ' INDEX 00 00:01:50')
+ @cuesheet[9] = ' INDEX 01 00:03:00'
cue.test_printTrackDataImage('flac')
cue.cuesheet.should == @cuesheet
end
Reply all
Reply to author
Forward
0 new messages