PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : .xsnd to mp3 converter- NOT WORKING!



CzarnyAfgan
13.06.2010, 10:01
Hello everyone. I wanted to create some audio/music mod ( to swap some creature sounds and to swap some music in the game ) , but unfortunately I realised, that .xsnd to mp3 converter ( one of the programs from Risen ModKit ) is not working... Can anybody do something with this stuff? I really want to make that mod, but now it's impossible. Please help. Greatings from Poland.

Please do not speak German in this topic, I had enough problems to log in the site. :gratz So ENGLISH ONLY!

NicoDE
13.06.2010, 14:28
There is no Risen ModKit.

Please be more specific what you did and what not.
Why do you think that this tool isn’t "working" (doing what you expect)?

CzarnyAfgan
13.06.2010, 16:32
-"There is no Risen ModKit"

Right, but I have found the program (mp3toxsnd) somewhere on this forum in "modifications and editing" section. Looks like you are the author- Niko Bendlin (NikoDe) :)

-"Please be more specific what you did and what not"
I am trying to convert file from mp3 format to .xsnd , so I tried to run
"mp3toxsnd" program, but every time I try to turn it on, the program breaks down and I get following error:
(screenshots):

http://img180.imageshack.us/i/program.png/

http://img816.imageshack.us/i/errorq.png/

Do you also have the same problem with that program, or am I alone? ... :(

Please help, I will be very grateful.

NicoDE
13.06.2010, 22:14
I’m not the author of that tool (my converter is for _xsnd -> mp3/txt).

The tool should have a README, shouldn’t it?

I guess that you have to pass the source (file name) to the program (on the command line). Drag ’n Drop the MP3 over the tool - this should solve your problem.

CzarnyAfgan
13.06.2010, 22:28
Unfortunately the "Drag and Drop" method does not work §cry .
Program's Readme file contains this text, nothing more:

***********

Ęîíńîëüíŕ˙ ęîěŕíäŕ

MP3toXSND.exe <îđčăčíŕëüíűé_ôŕéë._xsnd> <ôŕéë_çŕďčńč.mp3> <ěîäčôčöčđîâŕííűé_ôŕéë._xsnd>

Ďđčěĺđ ěîäčôčęŕöčč (çŕéňč â ďŕďęó xsnd_test)

MP3toXSND.exe titletheme%_2d._xsnd Alf.mp3 modified\titletheme%_2d._xsnd

Ďđîńëóřčâŕíčĺ đĺçóëüňŕňŕ (çŕéňč â ďŕďęó xsnd_test\modified)

RisenMP3.exe titletheme%_2d._xsnd

Ďîëó÷ĺííűé titletheme%_2d._xsnd čç ďŕďęč xsnd_test\modified íŕäî ńęîďčđîâŕňü â c:\Documents and Settings\Čě˙ Ďîëüçîâŕňĺë˙\Local Settings\Application Data\Risen\data\compiled\sounds\music\.

***********

Does anybody know ANY other program, that could convert audio files like wav. /mp3 into .xsnd format?

NicoDE
13.06.2010, 22:42
Does anybody know ANY other program, that could convert audio files like wav. /mp3 into .xsnd format?No, but here is the complete format specification:
[spec][_xsnd] Risen Sound Resource file format (http://forum.worldofplayers.de/forum/showthread.php?t=706479)

Larisa
13.06.2010, 23:07
I think the author is bdeimos

The syntax is something like this from what I can understand:

mp3toxsnd.exe original.xsnd yourmp3.mp3 modifiedxsndfile.xsnd

LordOfWAR
14.06.2010, 00:48
mp3toxsnd.exe original.xsnd yourmp3.mp3 modifiedxsndfile.xsnd

You are right. As I can understand from readme, author just use original xsnd to wrap new mp3...

CzarnyAfgan
14.06.2010, 19:58
Would you send a message to bdeimos- the author of "mp3toxsnd" program? Because I don't use ICQ messenger and someone could ask him If there is a way to run his program ( to convert .mp3 file to .xsnd file ).
I have found his profile, which contains his ICQ number http://forum.worldofplayers.de/forum/member.php?u=109934

Regards.

NicoDE
14.06.2010, 20:08
This tool has no Graphical User Interface (GUI) but a Character User Interface (CUI) / Command-line Interface (CLI).

Open a shell / command-line prompt (sometimes called "DOS window") and pass the required parameters on the command-line.

CzarnyAfgan
14.06.2010, 20:28
NikoDe- are talking about this?
http://img813.imageshack.us/i/beztytuudh.png/

"and pass the required parameters on the command-line"

What exactly do I have to type in, what do you mean Niko?

Baltram
14.06.2010, 21:39
Yes, he's talking about this.

What do you have to type in? It should, as Larisa already said, look similar to this: http://upload.worldofplayers.de/files5/mp3ToXsnd.JPG
In this case, the file "thisWillBeCreated" will be created^^

Hope you understand now.

Larisa
15.06.2010, 03:04
Would you send a message to bdeimos

You can send him a Private Message using the forum interface, no need for someone else to icq him: http://forum.worldofplayers.de/forum/private.php?do=newpm&u=109934

bdeimos
15.06.2010, 05:09
I think the author is bdeimos
The syntax is something like this from what I can understand:
mp3toxsnd.exe original.xsnd yourmp3.mp3 modifiedxsndfile.xsnd
Yes. It's me.
I created this prog and forgot about it.
This example is right, because my prog get audio from mp3 and some metadata from old xsnd. It gives possibility to replace ingame music.
Path for original and modified file must be different.
Name change will not work in game, so you need different folders.

Example of usage
1) Place file to change into folder old
2) Place your mp3 outside this folder
2) Open text editor and paste such text

mp3toxsnd.exe old/sound.xsnd yourmp3.mp3 sound.xsnd
3) Save it with name "run.bat"
4) You should got this
http://s53.radikal.ru/i142/1006/6a/8cc671474970.jpg_http://s53.radikal.ru/i142/1006/38/57d6df941818.jpg
5) Run "run.bat" to have this
http://s46.radikal.ru/i113/1006/6f/1bdce9f6ce0c.jpg

One italian comrad once had written me about my buggy soft. :)

CzarnyAfgan
15.06.2010, 09:17
Ok, I do all these steps, and at the final I recieve .xsnd file, but it's size it's only 0 KB, so I assume, that I must do something wrong...

So, this is my main folder, to be clear I have given the name "yourmp3.mp3" to audio file, which I want to be converted into xsnd.

http://img37.imageshack.us/i/93131969.jpg/

Next- folder "old" contains standard .xsnd file renamed to "sound._xsnd"

http://img190.imageshack.us/i/1secondfolder.jpg/

Than I run "run.bat" and I get following error:

http://img189.imageshack.us/i/2running.jpg/

As a result of running "run.bat" I recieve following file ( it's size is only 0 KB ):

http://img30.imageshack.us/i/73232427.jpg/

So, am I doing sth wrong? Btw. Thank you for your patience guys... :D

Larisa
15.06.2010, 11:19
That .bat is looking for sound.xsnd and you have sound._xsnd

Remove the underscore and try again.

CzarnyAfgan
15.06.2010, 12:37
"That .bat is looking for sound.xsnd and you have sound._xsnd

Remove the underscore and try again"

I have removed the underscore, tried again and situation is the same- created xsnd has
0 KB size

Larisa
15.06.2010, 12:46
Same C++ error or no error this time?

CzarnyAfgan
15.06.2010, 13:52
"Same C++ error or no error this time?"

-Yup, still the same error... Do you get normal xsnd file after running "run.bat"? ( by saying normal I mean file, which has size bigger than 0 KB )

My system specification:

Windows XP Professional 32 Bit Service Pack3

bdeimos
15.06.2010, 14:11
It was example. Not real usage.
I have no time to struggle with my stupid code. Sorry.
#include <stdio.h>
#include <string.h>

#define XSND_DATAOFF_OFFSET 0x00000010
#define XSND_DURATION_OFFSET 0x00000067


int main(int argc,char **argv)
{
FILE *fin,*fout;

int i,file_len;

unsigned char byte;

int dword;
int estimated_duration;

int bitrate_tbl[16] = {0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,0};

//=========================================================

puts(argv[1]);

fin = fopen(argv[1],"rb");

fout = fopen(argv[3],"wb");

//=========================================================

fseek(fin,XSND_DATAOFF_OFFSET,0);
fread(&dword,4,1,fin);

fseek(fin,0,0);

for(i = 0; i < dword; i++)
putc( getc(fin), fout);

fclose(fin);

//=========================================================

fin = fopen(argv[2],"rb");

fseek(fin,0,2);

file_len = ftell(fin);

fseek(fin,0,0);

for(i = 0; i < file_len; i++)
{
byte = getc(fin);

if(byte == 0xff)
{
byte = getc(fin);

if(byte == 0xfb)
{
byte = getc(fin);

estimated_duration = (file_len / bitrate_tbl[byte >> 4]) * 8;

fseek(fout,XSND_DURATION_OFFSET,0);
fwrite(&estimated_duration,4,1,fout);

fseek(fout,XSND_DATAOFF_OFFSET + 4,0);
fwrite(&file_len,4,1,fout);

break;
}
}
}

//=========================================================

fseek(fin,0,0);
fseek(fout,dword,0);

for(i = 0; i < file_len; i++)
putc( getc(fin), fout);

fclose(fin);

fclose(fout);

return 0;
}

Larisa
15.06.2010, 14:22
Do you get normal xsnd file after running "run.bat"? ( by saying normal I mean file, which has size bigger than 0 KB )

Yes, my resulting xsnd is not 0 in size.

CzarnyAfgan
15.06.2010, 16:49
Arrrgh, I have no idea what can cause that problem, I am almost sure that's not a fault of wrong parameters in the command-line in run.bat file, because i have modified it so many ways and it doesn't change anything... Still that error again and again and again...
Where did get your "MP3toXSND.exe" file from??? Regards

Is it possible that I may have wrong codecs?
I have installed K-lite Codec Pack

I am slowly running out of patience for my computer... :mad:

Nisarg
15.06.2010, 18:19
I don't think it gives a damn about codecs. I think the programme only encapsulates/ decapsulates stuff.

CzarnyAfgan
15.06.2010, 19:04
So, maybe I have worse version of "mp3toxsnd" , Larisa- Can I ask you where did you get your version? Because you say, that your program works.

Thanks

Baltram
15.06.2010, 19:07
I am almost sure that's not a fault of wrong parameters in the command-line in run.bat file, because i have modified it so many ways and it doesn't change anything...Well - I still think it's a fault in the parameters because the error you describe is exactly what happens usually with this tool if there's a problem with parameters...

Please download this (http://upload.worldofplayers.de/files5/xsnd_test.zip) file, unzip the folder and run run.bat (do nothing more!) - if there's still an error message you can be relative sure there is a problem with your system (maybe some dlls have wrong versions?). But I don't expect that.

CzarnyAfgan
15.06.2010, 20:04
"Please download this file, unzip the folder and run run.bat (do nothing more!) - if there's still an error message you can be relative sure there is a problem with your system (maybe some dlls have wrong versions?). But I don't expect that"

YES! YES! YES! it works! Baltram- I LOVE YOU!!! :D :D :D :gratz

So, problem is solved and now I can make some mod's!

Thanks everyone for help and infinite patience! :) :gratz :gratz :gratz

See you in the "Mod Release" section some day. §wink