vgmrips

The forum about vgm files
It is currently 2023-10-03, 22:54:29

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: 2017-01-17, 17:41:46 
Offline

Joined: 2016-08-03, 22:36:09
Posts: 36
Location: Italy
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:
@@ -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.


Top
 Profile  
 
 Post subject:
PostPosted: 2017-01-17, 22:17:44 

Staff Staff
Programmers Programmers
Musicians Musicians
Contributors Contributors
Reverse engineers Reverse engineers
Offline
User avatar

Joined: 2011-12-01, 20:20:07
Posts: 4658
Location: Germany
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.


Top
 Profile  
 
 Post subject:
PostPosted: 2017-01-18, 10:19:50 
Offline

Joined: 2016-08-03, 22:36:09
Posts: 36
Location: Italy
Ok, I see Your point.

Thank You for the explanation.

Giacomo


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 25 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
[ Time : 0.055s | 15 Queries | GZIP : On ]