Encode first sector
This commit is contained in:
@@ -115,4 +115,14 @@ impl Sector {
|
||||
Sector::CDXAAudio(_) => ()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn finalize(&mut self) {
|
||||
match self {
|
||||
Sector::Audio(_) => (),
|
||||
Sector::Empty(_) => (),
|
||||
Sector::CDData(sector) => sector.finalize(),
|
||||
Sector::CDXAData(sector) => sector.finalize(),
|
||||
Sector::CDXAAudio(sector) => sector.finalize(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -80,6 +80,10 @@ impl Header {
|
||||
self.sector = sector;
|
||||
}
|
||||
|
||||
pub fn get_time(&self) -> Time {
|
||||
Time::from((self.minute.clone(), self.second.clone(), self.sector.clone()))
|
||||
}
|
||||
|
||||
pub fn get_mode(&self) -> Result<HeaderMode, u8> {
|
||||
match self.mode {
|
||||
0 => Ok(HeaderMode::Mode0),
|
||||
|
Reference in New Issue
Block a user