vgmstream/src/meta/ea_eaac_opus_streamfile.h

25 lines
808 B
C
Raw Normal View History

#ifndef _EA_EAAC_OPUS_STREAMFILE_H_
#define _EA_EAAC_OPUS_STREAMFILE_H_
2020-02-02 21:20:51 +01:00
#include "deblock_streamfile.h"
2020-02-02 21:20:51 +01:00
static void block_callback(STREAMFILE *sf, deblock_io_data *data) {
data->block_size = 0x02 + read_u16be(data->physical_offset, sf);
data->data_size = data->block_size;
}
static STREAMFILE* open_io_eaac_opus_streamfile_f(STREAMFILE *new_sf, int stream_number, int stream_count) {
deblock_config_t cfg = {0};
cfg.step_start = stream_number;
2020-02-02 21:20:51 +01:00
cfg.step_count = stream_count;
cfg.block_callback = block_callback;
/* starts from 0 since new_sf is pre-deblocked */
/* setup subfile */
//new_sf = open_wrap_streamfile(sf); /* to be used with others */
2020-02-02 21:20:51 +01:00
new_sf = open_io_deblock_streamfile_f(new_sf, &cfg);
return new_sf;
}
#endif /* _EA_EAAC_OPUS_STREAMFILE_H_ */