Encode empty sectors with 0xFF for now
This commit is contained in:
parent
b6e4558e35
commit
1ffd83cac8
|
@ -115,24 +115,15 @@ pub fn create_xa_audio_for(data: &Vec<RawData>) -> Vec<Mode2Form2> {
|
|||
let mut sectors = vec![Mode2Form2::new(); sectors_to_parse*channel_count];
|
||||
let mut cur_sector_id = 0;
|
||||
|
||||
for sector_id in 0..sectors_to_parse {
|
||||
for _sector_id in 0..sectors_to_parse {
|
||||
let mut channel_id = 0;
|
||||
for channel in &mut channels {
|
||||
let sub_mode = {
|
||||
let mut sub_mode = SubMode::default_form2();
|
||||
|
||||
if sector_id + 1 == sectors_to_parse {
|
||||
sub_mode.set_eof();
|
||||
sub_mode.set_eor();
|
||||
}
|
||||
|
||||
else {
|
||||
sub_mode.set_real_time();
|
||||
}
|
||||
sub_mode
|
||||
};
|
||||
let mut sub_mode = SubMode::default_form2();
|
||||
let (raw_data, coding_info) = {
|
||||
if channel.is_empty() {
|
||||
sub_mode.set_eof();
|
||||
sub_mode.set_eor();
|
||||
|
||||
([0xFFu8; Mode2Form2::DATA_SIZE], CodingInfo::default())
|
||||
}
|
||||
|
||||
|
@ -149,6 +140,7 @@ pub fn create_xa_audio_for(data: &Vec<RawData>) -> Vec<Mode2Form2> {
|
|||
// v Skip EDC
|
||||
*channel = &channel[0x4..channel.len()];
|
||||
|
||||
sub_mode.set_real_time();
|
||||
(raw_data, sub_header.coding_info)
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue