coastline
0.0.4
Loading...
Searching...
No Matches
src
sdl
disctrackreader.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <
fstream
>
4
#include <
span
>
5
6
#include "
importer.h
"
7
8
namespace
coastline
{
9
11
class
DiscTrackReader
{
12
public
:
19
explicit
DiscTrackReader
(
const
CueTrack
&track);
20
31
bool
Read
(
std::uint64_t
sector,
std::uint32_t
count,
std::span<std::uint8_t>
output);
32
33
private
:
34
std::shared_ptr<const void>
m_storage;
35
std::vector<DiscTrackExtent>
m_extents;
36
std::uint64_t
m_count = 0;
37
std::uint32_t
m_stride = 0;
38
std::ifstream
m_file;
39
std::filesystem::path
m_open;
40
bool
m_valid =
false
;
41
};
42
43
}
// namespace coastline
std::ifstream
coastline::DiscTrackReader::DiscTrackReader
DiscTrackReader(const CueTrack &track)
Validate track extents against their files without loading their contents.
coastline::DiscTrackReader::Read
bool Read(std::uint64_t sector, std::uint32_t count, std::span< std::uint8_t > output)
Read complete stored sectors, including any headers and subchannel bytes.
fstream
importer.h
std::uint64_t
coastline
Definition
assetimport.h:11
std::filesystem::path
std::shared_ptr
span
coastline::CueTrack
One disc track with stored sector sizes and logical track boundaries.
Definition
importer.h:93
std::vector
Generated by
1.15.0