Skip to content

Commit

Permalink
Update cdriso.c
Browse files Browse the repository at this point in the history
  • Loading branch information
xjsxjs197 committed Sep 2, 2022
1 parent 20b362f commit 8569cf3
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions cdriso.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,14 +175,12 @@ static void *playthread(void *param)

long osleep, d, t, i, s;
unsigned char tmp;
int ret = 0, sector_offs, timePlus;
int isEnd = 0;
int ret = 0, sector_offs;

t = GetTickCount();

while (playing) {
s = 0;
timePlus = 0;
for (i = 0; i < sizeof(sndbuffer) / CD_FRAMESIZE_RAW; i++) {
sector_offs = cdda_cur_sector - cdda_first_sector;
if (sector_offs <= 0) {
Expand All @@ -195,12 +193,7 @@ static void *playthread(void *param)
if (d < CD_FRAMESIZE_RAW)
{
s += d;
isEnd = 1;
break;
}
else
{
timePlus++;
}
}

Expand All @@ -216,7 +209,6 @@ static void *playthread(void *param)

if (!cdr.Muted && playing) {
if (cddaBigEndian) {
//if (true) {
for (i = 0; i < s / 2; i++) {
tmp = sndbuffer[i * 2];
sndbuffer[i * 2] = sndbuffer[i * 2 + 1];
Expand Down Expand Up @@ -260,12 +252,6 @@ static void *playthread(void *param)
usleep(osleep * 1000);
t += CDDA_FRAMETIME;
}

if (isEnd)
{
playing = FALSE;
}

//p_cdrPlayCddaData(timePlus, isEnd);

}
Expand Down

0 comments on commit 8569cf3

Please sign in to comment.