Method: CHD::CD#track_start
- Defined in:
- lib/chd/cd.rb
#track_start(track, phys = false) ⇒ Integer
Get the frame number that the track starts at.
131 132 133 134 135 136 137 138 139 140 141 142 |
# File 'lib/chd/cd.rb', line 131 def track_start(track, phys = false) frame_ofs_type = phys ? :physframeofs : :logframeofs # handle lead-out specially if track == 0xAA @mapping.last[frame_ofs_type] elsif ! (1 .. @toc.size).include?(track) raise RangeError, "track must be in 1..#{@toc.size}" else @mappging.dig(track - 1, frame_ofs_type) end end |