Tweak EALayer3 comment

This commit is contained in:
bnnm 2019-11-02 16:10:54 +01:00
parent 73e60d64b1
commit f6b4df6680
2 changed files with 1112 additions and 1108 deletions

View File

@ -789,6 +789,11 @@ fail:
}
//TODO: this causes lots of rebuffering/slowness in multichannel since each stream has to read back
// (frames are interleaved like s0_g0, s1_g0, s2_g0, s0_g1, s1_g1, s2_g1, ...,
// stream0 advances buffers to s0_g1, but stream1 needs to read back to s1_g0, often trashing custom IO)
// would need to store granule0 after reading but not decoding until next?
/* Skip EA-frames from other streams for .sns/sps multichannel (interleaved 1 EA-frame per stream).
* Due to EALayer3 being in blocks and other complexities (we can't go past a block) all
* streams's offsets should start in the first stream's EA-frame.

View File

@ -40,7 +40,7 @@ static size_t eaac_io_read(STREAMFILE *streamfile, uint8_t *dest, off_t offset,
/* previous offset: re-start as we can't map logical<>physical offsets
* (kinda slow as it trashes buffers, but shouldn't happen often) */
if (offset < data->logical_offset) {
//;VGM_LOG("IO restart: offset=%lx + %x, po=%lx, lo=%lx\n", offset, length, data->physical_offset, data->logical_offset);
;VGM_LOG("IO restart: offset=%lx + %x, po=%lx, lo=%lx\n", offset, length, data->physical_offset, data->logical_offset);
data->physical_offset = data->stream_offset;
data->logical_offset = 0x00;
data->data_size = 0;
@ -260,8 +260,7 @@ static STREAMFILE* setup_eaac_streamfile(STREAMFILE *sf, int version, int codec,
/* setup subfile */
new_sf = open_wrap_streamfile(sf);
new_sf = open_io_streamfile_f(new_sf, &io_data, sizeof(eaac_io_data), eaac_io_read, eaac_io_size);
if (codec == 0x03) /* EA-XMA only since logical data is bigger */
new_sf = open_buffer_streamfile_f(new_sf, 0);
new_sf = open_buffer_streamfile_f(new_sf, 0); /* EA-XMA and multichannel EALayer3 benefit from this */
return new_sf;
}