commit 17726cb870aab823bcde61ab20f894e07ff5d3bf from: Omar Polo date: Thu Jul 13 12:20:45 2023 UTC unbreak percentage relative seeking commit - 7945ad342a011411ed99168161831108a8be5b09 commit + 17726cb870aab823bcde61ab20f894e07ff5d3bf blob - 8201dc2ee66cb298413f0d27ea16550637bdd069 blob + 23b3afca0ccc9da9f0275984852e6af657caa03d --- player.c +++ player.c @@ -145,13 +145,12 @@ again: if (IMSG_DATA_SIZE(imsg) != sizeof(seek)) fatalx("wrong size for seek ctl"); memcpy(&seek, imsg.data, sizeof(seek)); - if (seek.percent) { + if (seek.percent) *s = (double)seek.offset * (double)duration / 100.0; - } else { + else *s = seek.offset * current_rate; - if (seek.relative) - *s += samples; - } + if (seek.relative) + *s += samples; if (*s < 0) *s = 0; break;