Skip to content

[vgmplay issue??] vgmplay .vgm file format replay problem

Technical discussion about the VGM format, and all the software you need to handle VGM files.

Moderator: Staff

  • lo zaffo Offline
  • Posts: 39
  • Joined: 2016-08-03, 22:36:09
  • Location: Italy

[vgmplay issue??] vgmplay .vgm file format replay problem

Post by lo zaffo »

Hi, I would like to inform that compiling from sources in Windows 7 with minGW, in order to have vgmplay
make use .vgm file format (.vgm only because compressed .vgz file format is just fine), I do the following changes to VGMPlay/VGMPlay.c module

Code: Select all

@@ -1383,12 +1383,12 @@ static bool OpenVGMFile_Internal(gzFile hFile, UINT32 FileSize)
CloseVGMFile();

FileMode = 0x00;
VGMDataLen = FileSize;

- gzseek(hFile, 0x00, SEEK_SET);
- //gzrewind(hFile);
+ //gzseek(hFile, 0x00, SEEK_SET);
+ gzrewind(hFile);
ReadVGMHeader(hFile, &VGMHead);
if (VGMHead.fccVGM != FCC_VGM)
{
printf("VGM signature matched on the first read, but not on the second one!\n");
printf("This is a known zlib bug where gzseek fails. Please install a fixed zlib.\n");
Just a note.

Giacomo

VB edit: using code tags for better readability.
  • User avatar
  • ValleyBell Offline
  • Posts: 4768
  • Joined: 2011-12-01, 20:20:07
  • Location: Germany

Post by ValleyBell »

Oh right - that's the only place where I'm using gzseek instead of gzrewind.
I forgot why I left it in there, but it was probably to warn whoever compiles it - because all of the tools still use gzseek.
And gzseek doesn't work properly under MinGW due to them using a 64-bit API that isn't implemented. The bug is fixed in zlib 1.29.
  • lo zaffo Offline
  • Posts: 39
  • Joined: 2016-08-03, 22:36:09
  • Location: Italy

Post by lo zaffo »

Ok, I see Your point.

Thank You for the explanation.

Giacomo
Post Reply