mirror of
https://github.com/iluvcapra/bwavfile.git
synced 2026-01-01 09:20:45 +00:00
Merge pull request #10 from atoav/cuepoints
Surface cue frame_offset field in UI and test for sounddevices files.
This commit is contained in:
18
src/cue.rs
18
src/cue.rs
@@ -281,7 +281,16 @@ pub struct Cue {
|
||||
pub label : Option<String>,
|
||||
|
||||
/// The text "note"/comment of this marker if provided
|
||||
pub note : Option<String>
|
||||
pub note : Option<String>,
|
||||
|
||||
/// The offser of this marker
|
||||
///
|
||||
/// **Note:** Applications use the `frame` and `offset` fields
|
||||
/// in different ways. iZotope RX Audio Editor writes the
|
||||
/// marker position to *both* fields, while a Sound Devices
|
||||
/// recorder writes the marker position to *only* the `offset`
|
||||
/// field.
|
||||
pub offset : u32
|
||||
}
|
||||
|
||||
|
||||
@@ -306,7 +315,7 @@ impl Cue {
|
||||
chunk_id: DATA_SIG,
|
||||
chunk_start: 0,
|
||||
block_start: 0,
|
||||
frame_offset: cue.frame
|
||||
frame_offset: cue.offset
|
||||
};
|
||||
|
||||
let raw_label = cue.label.as_ref().map(|val| {
|
||||
@@ -380,10 +389,11 @@ impl Cue {
|
||||
//.filter_map(|x| str::from_utf8(&x.text).ok())
|
||||
.map(|s| convert_to_cue_string(&s.text))
|
||||
.next()
|
||||
}
|
||||
},
|
||||
offset: i.frame_offset
|
||||
}
|
||||
}).collect()
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user