Fix incorrect PCM data offset
This commit is contained in:
parent
187e6bab24
commit
906ed530b8
1 changed files with 1 additions and 1 deletions
|
@ -46,7 +46,7 @@ void ZsmBackend::load(const char *filename) {
|
||||||
file->seek(pcm_offset, SeekType::SET);
|
file->seek(pcm_offset, SeekType::SET);
|
||||||
file->read(loop_point, 1, 1);
|
file->read(loop_point, 1, 1);
|
||||||
pcm_offset++;
|
pcm_offset++;
|
||||||
pcm_data_offs = (loop_point[0] * 16) + pcm_offset;
|
pcm_data_offs = (((uint16_t)loop_point[0]) + 1) * 16) + pcm_offset;
|
||||||
file->seek(music_data_start, SeekType::SET);
|
file->seek(music_data_start, SeekType::SET);
|
||||||
this->loop_point = std::max(this->loop_point, (uint32_t)music_data_start);
|
this->loop_point = std::max(this->loop_point, (uint32_t)music_data_start);
|
||||||
double prev_time = 0.0;
|
double prev_time = 0.0;
|
||||||
|
|
Loading…
Reference in a new issue