mirror of
https://github.com/iluvcapra/bwavfile.git
synced 2025-12-31 17:00:44 +00:00
Removed Cue.ident field from interface
This commit is contained in:
13
src/cue.rs
13
src/cue.rs
@@ -20,6 +20,15 @@ struct RawCue {
|
||||
}
|
||||
|
||||
impl RawCue {
|
||||
|
||||
fn write_to(cues : Vec<Self>) -> Vec<u8> {
|
||||
let mut writer = Cursor::new(vec![0u8; 0]);
|
||||
|
||||
|
||||
todo!()
|
||||
|
||||
}
|
||||
|
||||
fn read_from(data : &[u8]) -> Result<Vec<Self>,Error> {
|
||||
let mut rdr = Cursor::new(data);
|
||||
let count = rdr.read_u32::<LittleEndian>()?;
|
||||
@@ -198,7 +207,7 @@ impl AdtlMemberSearch for Vec<RawAdtlMember> {
|
||||
pub struct Cue {
|
||||
|
||||
/// Unique numeric identifier for this cue
|
||||
pub ident : u32,
|
||||
//pub ident : u32,
|
||||
|
||||
/// The time of this marker
|
||||
pub frame : u32,
|
||||
@@ -236,7 +245,7 @@ impl Cue {
|
||||
raw_cues.iter()
|
||||
.map(|i| {
|
||||
Cue {
|
||||
ident : i.cue_point_id,
|
||||
//ident : i.cue_point_id,
|
||||
frame : i.frame,
|
||||
length: {
|
||||
raw_adtl.ltxt_for_cue_point(i.cue_point_id).first()
|
||||
|
||||
@@ -320,19 +320,16 @@ impl<R: Read + Seek> WaveReader<R> {
|
||||
/// let cue_points = f.cue_points().unwrap();
|
||||
///
|
||||
/// assert_eq!(cue_points.len(), 3);
|
||||
/// assert_eq!(cue_points[0].ident, 1);
|
||||
/// assert_eq!(cue_points[0].frame, 12532);
|
||||
/// assert_eq!(cue_points[0].length, None);
|
||||
/// assert_eq!(cue_points[0].label, Some(String::from("Marker 1")));
|
||||
/// assert_eq!(cue_points[0].note, Some(String::from("Marker 1 Comment")));
|
||||
///
|
||||
/// assert_eq!(cue_points[1].ident, 2);
|
||||
/// assert_eq!(cue_points[1].frame, 20997);
|
||||
/// assert_eq!(cue_points[1].length, None);
|
||||
/// assert_eq!(cue_points[1].label, Some(String::from("Marker 2")));
|
||||
/// assert_eq!(cue_points[1].note, Some(String::from("Marker 2 Comment")));
|
||||
///
|
||||
/// assert_eq!(cue_points[2].ident, 3);
|
||||
/// assert_eq!(cue_points[2].frame, 26711);
|
||||
/// assert_eq!(cue_points[2].length, Some(6465));
|
||||
/// assert_eq!(cue_points[2].label, Some(String::from("Timed Region")));
|
||||
|
||||
Reference in New Issue
Block a user