Author Topic: Open .mo3 file failed  (Read 2734 times)

Offline LPChip

  • Administrator
  • *****
  • Posts: 4,956
    • http://lpchip.nl
  • Operating System: Windows 10 Pro N (x64bit)
Re: Open .mo3 file failed
« Reply #15 on: March 14, 2017, 12:11:55 »
[Joke mode on]
Maybe its in MO1 or MO2? xD
[joke mode off]
"Heh, maybe I should've joined the compo only because it would've meant I wouldn't have had to worry about a damn EQ or compressor for a change. " - Atlantis
"yes.. I think in this case it was wishful thinking: MPT is makng my life hard so it must be wrong" - Rewbs

Offline mo3file

  • Shy artist
  • Posts: 6
  • Operating System: Windows 10
Re: Open .mo3 file failed
« Reply #16 on: March 17, 2017, 14:24:43 »
The game is Air Strike 2 3D. The company does not exist anymore but there are some archives. Now i know what you are looking for so here is the bass.dll file. Version is 2.1.0.3

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 6,232
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 7 x64
Re: Open .mo3 file failed
« Reply #17 on: March 17, 2017, 15:52:10 »
Okay, the problem is far easier than that.
Given the path in your screenshots, I suppose you wrote a python script to extract the MO3 files from the game's data file. However, you didn't open the input and/or output file in binary mode, which typically means that on a Windows systems, the characters \r and \n are automatically converted into a Windows line ending (\r\n). As a result, the file you extracted differs from the original data file. To avoid this conversion, binary files must always be opened in binary mode, not text mode!
If you follow this advice, you can extract the music correctly.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

Offline mo3file

  • Shy artist
  • Posts: 6
  • Operating System: Windows 10
Re: Open .mo3 file failed
« Reply #18 on: March 19, 2017, 16:18:30 »
Thanks but i didn't understand what you mean with binary mode, so i extracted the files in Ubuntu Virtualbox instead and it worked perfectly!

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 6,232
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 7 x64
Re: Open .mo3 file failed
« Reply #19 on: March 19, 2017, 22:46:54 »
Binary mode is a flag for opening files. How to invoke it depends on the programming language you use, so you would have to read up the Python manual on the command that is used for opening files.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.