Mercurial > repos > blastem
comparison system.h @ 2298:9d68799f945b
Added basic FLAC seek implementation and added support for FLAC tracks in CUE sheets
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Thu, 09 Mar 2023 22:49:42 -0800 |
parents | 92449b47cce8 |
children | 9f0c67e5c50a |
comparison
equal
deleted
inserted
replaced
2297:e6b2b2341c68 | 2298:9d68799f945b |
---|---|
1 #ifndef SYSTEM_H_ | 1 #ifndef SYSTEM_H_ |
2 #define SYSTEM_H_ | 2 #define SYSTEM_H_ |
3 #include <stddef.h> | 3 #include <stddef.h> |
4 #include <stdint.h> | 4 #include <stdint.h> |
5 #include <stdio.h> | 5 #include <stdio.h> |
6 #include "flac.h" | |
6 | 7 |
7 typedef struct system_header system_header; | 8 typedef struct system_header system_header; |
8 typedef struct system_media system_media; | 9 typedef struct system_media system_media; |
9 | 10 |
10 typedef enum { | 11 typedef enum { |
109 SUBCODES_COOKED | 110 SUBCODES_COOKED |
110 }; | 111 }; |
111 | 112 |
112 typedef struct { | 113 typedef struct { |
113 FILE *f; | 114 FILE *f; |
115 flac_file *flac; | |
114 uint32_t file_offset; | 116 uint32_t file_offset; |
115 uint32_t fake_pregap; | 117 uint32_t fake_pregap; |
116 uint32_t pregap_lba; | 118 uint32_t pregap_lba; |
117 uint32_t start_lba; | 119 uint32_t start_lba; |
118 uint32_t end_lba; | 120 uint32_t end_lba; |
140 uint32_t cur_track; | 142 uint32_t cur_track; |
141 uint32_t size; | 143 uint32_t size; |
142 uint32_t cur_sector; | 144 uint32_t cur_sector; |
143 media_type type; | 145 media_type type; |
144 uint8_t in_fake_pregap; | 146 uint8_t in_fake_pregap; |
145 uint8_t byte_storage; | 147 uint8_t byte_storage[3]; |
146 }; | 148 }; |
147 | 149 |
148 #define OPT_ADDRESS_LOG (1U << 31U) | 150 #define OPT_ADDRESS_LOG (1U << 31U) |
149 | 151 |
150 system_type detect_system_type(system_media *media); | 152 system_type detect_system_type(system_media *media); |