VOGONS

Common searches


First post, by personne

User metadata
Rank Newbie
Rank
Newbie

Okay, so as a bit of a foreword:

The last time I made a topic and was active on this forum, it was a long time ago. Since then I've actually learned some programming (JAVA and I'm starting C++ soon), so I have a more in-depth appreciation for coding now. I have really tried my best to solve the issue.

Anyways, I wanted to compile the ogg-winmm wrapper to make some old game audio working (the wrapper from here: https://github.com/hifi-unmaintained/ogg-winmm )

I installed MinGW with Msys. I then compiled libogg and libvorbis and vorbis-tools. Then I tried to compile the wrapper (as the guy on github said to).

And this is what happened:

C:\Users\Michael\Desktop\ogg-winmm-master>windres -i wav-winmm.rc.in -o wav-winm
m.rc.o

C:\Users\Michael\Desktop\ogg-winmm-master>gcc -std=c99 -Wl,--enable-stdcall-fixu
p -Ilibs/include -O2 -shared -s -o wav-winmm.dll wav-winmm.c player.c wav-winmm.
def wav-winmm.rc.o -L. -lvorbisfile-3 -lwinmm

wav-winmm.c: In function 'fake_mciSendStringA':
wav-winmm.c:503:9: warning: passing argument 4 of 'fake_mciSendCommandA' makes i
nteger from pointer without a cast [enabled by default]
fake_mciSendCommandA(MAGIC_DEVICEID, MCI_STOP, 0, NULL);
^
wav-winmm.c:154:17: note: expected 'DWORD_PTR' but argument is of type 'void *'
MCIERROR WINAPI fake_mciSendCommandA(MCIDEVICEID IDDevice, UINT uMsg, DWORD_PTR
fdwCommand, DWORD_PTR dwParam)
^
wav-winmm.c:513:9: warning: passing argument 4 of 'fake_mciSendCommandA' makes i
nteger from pointer without a cast [enabled by default]
fake_mciSendCommandA(MAGIC_DEVICEID, MCI_PLAY, MCI_FROM|MCI_TO, &parms)
;
^
wav-winmm.c:154:17: note: expected 'DWORD_PTR' but argument is of type 'struct M
CI_PLAY_PARMS *'
MCIERROR WINAPI fake_mciSendCommandA(MCIDEVICEID IDDevice, UINT uMsg, DWORD_PTR
fdwCommand, DWORD_PTR dwParam)
^
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot fin
d -lvorbisfile-3
collect2.exe: error: ld returned 1 exit status

I don't know enough about C coding to understand the initial errors (though speaking from my JAVA experience it looks like there was some form of compiling issue, though of course I'm sure some of you on the forum know more than me), but the missing lvorbisfile-3 error is more straightforward-seeming.

I don't know what is missing (or rather, how to take care of it). What should I do to get this to compile properly?

Edit:
For reference; Yes, I'm trying to patch Assault Rigs to allow the audio without the CD. I have already taken care of the glrage wrapper (which works beautifully)

ALSO: If I can get this wrapper working, I will modify the top post of this thread to give a full run-down of what I did in complete detail, that way anyone can get the wrapper compile without having to guess most of the way.

Last edited by personne on 2016-02-06, 19:43. Edited 4 times in total.

Reply 1 of 8, by collector

User metadata
Rank l33t
Rank
l33t

This forum is for Windows games. This probably belongs in Milliways. Perhaps a mod will be kind enough to move it for you.

The Sierra Help Pages -- New Sierra Game Installers -- Sierra Game Patches -- New Non-Sierra Game Installers

Reply 2 of 8, by personne

User metadata
Rank Newbie
Rank
Newbie
collector wrote:

This forum is for Windows games. This probably belongs in Milliways. Perhaps a mod will be kind enough to move it for you.

Well, I am trying to patch a windows game. (Assault Rigs, which my previous thread covered wrapping graphically).
I did try to check if this forum section would be appropriate, when I searched the forums several winmm related threads ( Re: NASCAR Racers (Hasbro) - no CD audio and Is there a way to fix CDDA volume issues under Vista/7? ) were under the windows forums.

Reply 3 of 8, by ZellSF

User metadata
Rank l33t
Rank
l33t

You need libvorbisfile-3.dll in the build directory. not sure why you're getting so many warnings, but it should compile if you have that library file. You probably should have it from compiling libvorbis (I didn't bother and just got it from another ogg-winmm build).

You should look at the forks of that project btw, they're more up to date. hifi's hasn't updated it in ages and you really don't need to compile it: it's included in almost every GoG CDDA game.

Or you know, try _inmm if you haven't already.

Reply 4 of 8, by personne

User metadata
Rank Newbie
Rank
Newbie
ZellSF wrote:

You need libvorbisfile-3.dll in the build directory. not sure why you're getting so many warnings, but it should compile if you have that library file. You probably should have it from compiling libvorbis (I didn't bother and just got it from another ogg-winmm build).

You should look at the forks of that project btw, they're more up to date. hifi's hasn't updated it in ages and you really don't need to compile it: it's included in almost every GoG CDDA game.

Or you know, try _inmm if you haven't already.

I have made an attempt to use _inmm before, but it just didn't seem to work.

Anyways, I got a copy of libvorbisfile-3.dll from the bangstk fork of the original wrapper.
I first tried the pre-compiled wav-winmm.dll release, but I had an issue where the game just turned into a while screen immediately for some reason (I don't know why by the way).

Edit: The screen turns white when the game starts playing the introduction .MPG video.

So I tried compiling the code. I went to the project's directory (where I had put the dll's too) and ran the makefile in Msys's bash window.
I got this:

$ make […]
Show full quote

$ make

sh: git: command not found
sed 's/__REV__//g' wav-winmm.rc.in |sed 's/__FILE__/wav-winmm/g' | mingw-windres -O coff -o wav-winmm.rc.o
/bin/sh: mingw32-windres: command not found
make: *** [wav-winmm.rc.o] Error 127

Reply 6 of 8, by personne

User metadata
Rank Newbie
Rank
Newbie
ZellSF wrote:

rename /bin/windres to /bin/mingw32-windres
or change the makefile to say windres and not mingw32-windres

Thanks, I edited the makefile and it compiled!.

But then I run into the same issue I had with the pre-compiled one 😒
The screen turns white after the title and 3D rage logos appear and the intro video starts playing.
So I removed the videos from the game's directory, and it ran!

BUT, the music still doesn't work...
I have the sub-directory named "Music" and the files inside it all named "track02.ogg","track03.ogg", et cetera. (I do know the tracks are in order)
I don't know why the music won't work.

Oh, I can get the music to work with the CD in the disk drive though...

EDIT: I renamed the thread since I have the wrapper compiling, but still not working.

Reply 7 of 8, by ZellSF

User metadata
Rank l33t
Rank
l33t

Really can't tell you what to do, I can't test anything since I don't have the game and it's fairly difficult to find. Suggestions though:

1: Make sure you renamed wav-winmm.dll to just winmm.dll
2: try this modification to ogg-winmm
3: Try to detail why you couldn't get _inmm working, because that would be my first choice for trying to do this.

Reply 8 of 8, by Azarien

User metadata
Rank Oldbie
Rank
Oldbie
[…]
Show full quote
wav-winmm.c: In function 'fake_mciSendStringA':
wav-winmm.c:503:9: warning: passing argument 4 of 'fake_mciSendCommandA' makes i
nteger from pointer without a cast [enabled by default]
fake_mciSendCommandA(MAGIC_DEVICEID, MCI_STOP, 0, NULL);
^
wav-winmm.c:154:17: note: expected 'DWORD_PTR' but argument is of type 'void *'
MCIERROR WINAPI fake_mciSendCommandA(MCIDEVICEID IDDevice, UINT uMsg, DWORD_PTR
fdwCommand, DWORD_PTR dwParam)
^
wav-winmm.c:513:9: warning: passing argument 4 of 'fake_mciSendCommandA' makes i
nteger from pointer without a cast [enabled by default]
fake_mciSendCommandA(MAGIC_DEVICEID, MCI_PLAY, MCI_FROM|MCI_TO, &parms)

Those warnings are irrelevant as long as you compile the library as 32-bit. They essentially mean that the code is not portable to 64-bit.