The Ur-Quan Masters Home Page Welcome, Guest. Please login or register.
Did you miss your activation email?
June 04, 2020, 01:26:02 pm
Home Help Search Login Register
News: Paul & Fred have reached a settlement with Stardock!

+  The Ur-Quan Masters Discussion Forum
|-+  The Ur-Quan Masters Re-Release
| |-+  Technical Issues (Moderator: Death 999)
| | |-+  ABX and AIF help
« previous next »
Pages: [1] 2 Print
Author Topic: ABX and AIF help  (Read 9600 times)
Serosis
Enlightened
*****
Offline Offline

Gender: Male
Posts: 1323



View Profile WWW
ABX and AIF help
« on: March 04, 2006, 12:39:18 am »

i wanna ask a favor to the dev team or whoever handled the audio for UQM...

could you build abx2raw and aif2raw so i can compare it to the ones i've built, i believe the ones that i have compiled didn't compile correctly.

thanks
Logged

The artist formerly known as Kohr-Ah Death.

Get your MegaMod HERE
meep-eep
Forum Admin
Enlightened
*****
Offline Offline

Posts: 2847



View Profile
Re: ABX and AIF help
« Reply #1 on: March 04, 2006, 02:53:00 am »

http://www.stack.nl/~svdb/sc2/abx2raw and http://www.stack.nl/~svdb/sc2/aif2raw
Logged

“When Juffo-Wup is complete
when at last there is no Void, no Non
when the Creators return
then we can finally rest.”
Serosis
Enlightened
*****
Offline Offline

Gender: Male
Posts: 1323



View Profile WWW
Re: ABX and AIF help
« Reply #2 on: March 04, 2006, 03:57:56 am »

yeah mine are way different than what they're supposed to be, my files are like 10 times the size of these and mine don't even work  Tongue

how would i compile these tools in MSYS/mingw?

this is just for future reference
Logged

The artist formerly known as Kohr-Ah Death.

Get your MegaMod HERE
meep-eep
Forum Admin
Enlightened
*****
Offline Offline

Posts: 2847



View Profile
Re: ABX and AIF help
« Reply #3 on: March 04, 2006, 04:48:18 am »

I don't think mine will work for you either. I was just having a bit of fun; these files I posted were Linux binaries, and I expect you'll want Windows binaries (which I don't have).
How big executables get depend on a lot of things. Statically/dynamically linked, with or without debug info, with or without optimisation, optimising for speed or size, and what compiler you're using.
In what way are your executables not working? Do they cause a runtime error? Do they produce bad output files?
As for how to compile using MinGW: There's a makefile supplied. You just type 'make' (or 'gmake'). 'make' will do 'gcc -W -Wall -g -O0 abx2raw.c -o abx2raw' for you.
Logged

“When Juffo-Wup is complete
when at last there is no Void, no Non
when the Creators return
then we can finally rest.”
Serosis
Enlightened
*****
Offline Offline

Gender: Male
Posts: 1323



View Profile WWW
Re: ABX and AIF help
« Reply #4 on: March 04, 2006, 05:13:14 am »

well i'm using dev-C++ to compile them and i get a bad output file that is basically nothing but a named 0 kb file

that's why i suspect a bad compile
i've even tried getting VS 2003 and 2005 to compile it but they refuse to.


.:: EDIT ::.
do these tools even work in windows?
« Last Edit: March 04, 2006, 05:44:08 am by Kohr-Ah Death » Logged

The artist formerly known as Kohr-Ah Death.

Get your MegaMod HERE
meep-eep
Forum Admin
Enlightened
*****
Offline Offline

Posts: 2847



View Profile
Re: ABX and AIF help
« Reply #5 on: March 04, 2006, 08:48:45 am »

No warnings or error messages?

Quote
do these tools even work in windows?
I personally haven't tried them in Windows. But I think someone had, at some point.
Note that the scripts that convert to .wav use sox, which I doubt will compile on Windows. So you can only convert to .abx and .aif. But any sound program that can import raw files can be used to turn those into .wavs. All you have to know is the type of data.
abx is 11025 Hz mono, 8 bits signed linear data.
aif is 44100 Hz stereo, 16 bits signed linear data.
You'll hear it if you get it wrong.

Logged

“When Juffo-Wup is complete
when at last there is no Void, no Non
when the Creators return
then we can finally rest.”
Novus
Enlightened
*****
Offline Offline

Gender: Male
Posts: 1938


Fot or not?


View Profile
Re: ABX and AIF help
« Reply #6 on: March 04, 2006, 11:02:09 am »

abx2raw works fine with MinGW, just run "make" in the abx directory under MSYS to compile. aif2raw, however, just says "No sound data chunk found." and exits, leaving a zero-size RAW file (tested on the HyperSpace music). Investigating.
Logged

RTFM = Read the fine manual.
RTTFAQ = Read the Ur-Quan Masters Technical FAQ.
Novus
Enlightened
*****
Offline Offline

Gender: Male
Posts: 1938


Fot or not?


View Profile
Re: ABX and AIF help
« Reply #7 on: March 04, 2006, 03:27:32 pm »

aif2raw suffers quite badly from "the-world-is-my-Linux-box-itis". Both the input and output files are opened in text mode and the entire output file (several megabytes!) is stored on the stack.  The result is that the file is truncated at the DOS EOF character (0x1A) and carriage returns (0x0A) are converted to DOS format (0x0D 0x0A). Obviously, this is bad. Windows also objects to having a 32 MB stack frame for some reason.

Solution: change the fopen calls to use modes "rb" and "wb" instead of "r" and "w" respectively. Then change all the calls to alloca to use malloc instead (and add some corresponding frees if you feel pedantic).
Logged

RTFM = Read the fine manual.
RTTFAQ = Read the Ur-Quan Masters Technical FAQ.
meep-eep
Forum Admin
Enlightened
*****
Offline Offline

Posts: 2847



View Profile
Re: ABX and AIF help
« Reply #8 on: March 04, 2006, 09:10:10 pm »

Oh, I thought I fixed that ages ago. I hope you didn't spend too much time figuring this out; it was the first thing in my mind when I read your previous posting.
Anyhow, these progs were created to convert the abx and aif files once, and never be run again. Portability was not an issue.
Logged

“When Juffo-Wup is complete
when at last there is no Void, no Non
when the Creators return
then we can finally rest.”
Novus
Enlightened
*****
Offline Offline

Gender: Male
Posts: 1938


Fot or not?


View Profile
Re: ABX and AIF help
« Reply #9 on: March 04, 2006, 10:41:05 pm »

Oh, I thought I fixed that ages ago. I hope you didn't spend too much time figuring this out; it was the first thing in my mind when I read your previous posting.
Not really. The time-consuming part was downloading Emacs for Windows.

Quote
Anyhow, these progs were created to convert the abx and aif files once, and never be run again. Portability was not an issue.
Any code you put in the public CVS tree of a well-known project will eventually be scrutinised by someone. Wink

One reason for running these programs could be to extract the original music and speech from the 3DO CD without the quality loss caused by the Vorbis compression (not that I can hear any difference). Any audiophiles here want FLAC support for music/speech? Grin

BTW, aifc2wav may also interest you.

Just to hear what I've been missing, I'm listening to the difference between the UQM OGG and the 3DO SC2 AIF of the Hyperspace music. I can't really hear the tune itself; mostly I hear a lot of wooshing sounds and the upper part of the snare drums. Trippy.
« Last Edit: March 04, 2006, 10:44:15 pm by Novus » Logged

RTFM = Read the fine manual.
RTTFAQ = Read the Ur-Quan Masters Technical FAQ.
Serosis
Enlightened
*****
Offline Offline

Gender: Male
Posts: 1323



View Profile WWW
Re: ABX and AIF help
« Reply #10 on: March 05, 2006, 12:04:33 am »

abx2raw works fine with MinGW, just run "make" in the abx directory under MSYS to compile. aif2raw, however, just says "No sound data chunk found." and exits, leaving a zero-size RAW file (tested on the HyperSpace music). Investigating.

yeah, i never got an error message when i tried aif2raw, it just opened and closed (yes i did input the right commands), but i havent really tried to convert the abx files yet so maybe i'll test that out...

oh and the 'pkg' tool, what exactly do i need to compile that?
both dev-c++ and mingw can't compile it...

the only reason i try these tools is just that i'm VERY curious, and a few other 3DO games have the same formats that i want to convert.
Logged

The artist formerly known as Kohr-Ah Death.

Get your MegaMod HERE
Serosis
Enlightened
*****
Offline Offline

Gender: Male
Posts: 1323



View Profile WWW
Re: ABX and AIF help
« Reply #11 on: March 05, 2006, 12:25:49 am »

Solution: change the fopen calls to use modes "rb" and "wb" instead of "r" and "w" respectively. Then change all the calls to alloca to use malloc instead (and add some corresponding frees if you feel pedantic).

well i did that but i get

Code:
[Linker error] undefined reference to 'stderr'

both in MSYS and Dev-C++
i think it might be an error on my part though, so i'll report back when i fix my include directories  Grin

.:: EDIT ::.
Got it to work now, but i still have troubles with the 'pkg' tool...
i hope i'm not annoying you guys with all this Smiley
« Last Edit: March 05, 2006, 01:23:13 am by Kohr-Ah Death » Logged

The artist formerly known as Kohr-Ah Death.

Get your MegaMod HERE
Novus
Enlightened
*****
Offline Offline

Gender: Male
Posts: 1938


Fot or not?


View Profile
Re: ABX and AIF help
« Reply #12 on: March 05, 2006, 10:05:33 am »

Got it to work now, but i still have troubles with the 'pkg' tool...
i hope i'm not annoying you guys with all this Smiley
You did notice that the makefile has two different relevant targets, unpkg and parseres, didn't you? Either way, unpkg looks like it contains a lot more Unix-specific stuff than the others, so you may have to rewrite some stuff. Cygwin might work better than MinGW. I'll take a look at it next time I boot Windows...

Edit: MinGW doesn't have a proper mmap implementation, so you'll have to rewrite the file read code to create a buffer and read the file into that instead (or try to figure out Windows' equivalent to mmap).
« Last Edit: March 05, 2006, 10:34:20 am by Novus » Logged

RTFM = Read the fine manual.
RTTFAQ = Read the Ur-Quan Masters Technical FAQ.
Serosis
Enlightened
*****
Offline Offline

Gender: Male
Posts: 1323



View Profile WWW
Re: ABX and AIF help
« Reply #13 on: March 05, 2006, 10:03:05 pm »

Got it to work now, but i still have troubles with the 'pkg' tool...
i hope i'm not annoying you guys with all this Smiley
You did notice that the makefile has two different relevant targets, unpkg and parseres, didn't you? Either way, unpkg looks like it contains a lot more Unix-specific stuff than the others, so you may have to rewrite some stuff. Cygwin might work better than MinGW. I'll take a look at it next time I boot Windows...

Edit: MinGW doesn't have a proper mmap implementation, so you'll have to rewrite the file read code to create a buffer and read the file into that instead (or try to figure out Windows' equivalent to mmap).

well i fixed most of it with some tips from the MSDN and i fixed 'parseres' so that no errors or warnings are generated, but the 'mmap' is giving me the most trouble.


.:: EDIT ::.
right now out of sheer boredom i'm gonna optimize aif2raw or aif2wav to be simply just drag and drop, maybe later i'll add a simple GUI. NOTE: nevermind  i just did a test on wether the converted raw files are any different from the .ogg files and they have no difference whatsoever, so it would be pointless Cheesy
« Last Edit: March 06, 2006, 12:23:22 am by Kohr-Ah Death » Logged

The artist formerly known as Kohr-Ah Death.

Get your MegaMod HERE
Halleck
Enlightened
*****
Offline Offline

Gender: Male
Posts: 750


Personal Text


View Profile WWW
Re: ABX and AIF help
« Reply #14 on: March 05, 2006, 11:34:56 pm »

Cool.

BTW, I just remembered I have an aif2raw.exe here... I think I compiled it with Dev-C++ but it might have been VC7.
Logged


Currently working on: Going outside more

Game projects: Vega Strike / Elite Strike
Pages: [1] 2 Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!