MCPcopy Create free account
hub / github.com/BlitterStudio/amiberry / gettoc

Function gettoc

src/blkdev.cpp:103–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101}
102
103static struct cd_toc *gettoc (int unitnum, struct cd_toc_head *th, int block)
104{
105 if (th->lastaddress == 0) {
106 if (unitnum < 0)
107 return NULL;
108 if (!sys_command_cd_toc(unitnum, th))
109 return NULL;
110 }
111 for (int i = th->first_track_offset + 1; i <= th->last_track_offset; i++) {
112 struct cd_toc *t = &th->toc[i];
113 if (block < t->paddress)
114 return t - 1;
115 }
116 return &th->toc[th->last_track_offset];
117}
118
119int cdtracknumber(struct cd_toc_head *th, int block)
120{

Callers 3

cdtracknumberFunction · 0.85
isaudiotrackFunction · 0.85
scsi_cd_emulateFunction · 0.85

Calls 1

sys_command_cd_tocFunction · 0.85

Tested by

no test coverage detected