self.write_buffer_offset += num_bytes_written;
}
+ ///
+ /// Check whether or not recording @p recording_id exists.
+ pub fn has_recording(&mut self, recording_id: u16) -> bool {
+ if recording_id == 0 {
+ return false;
+ }
+
+ self.sector_header_iter().find(|&index| {
+ let sector_header = &self.sector_header[index as usize];
+
+ sector_header.recording_id == recording_id &&
+ sector_header.starts_recording()
+ }).is_some()
+ }
+
///
/// Retrieve recording @p recording_id and
/// write it to @p tx_buf in yencoded form.