Page 1 of 1

music/sound problem in Q3A and how to solve it

Posted: Wed Nov 19, 2008 3:24 pm
by monaster
I tried implementing custom music for one of my maps, just as I've successfully done it many times before, but this time the track didn't initiated when I loaded the map inside Q3A and the console gave me the following information: "no data chunk in [nameofmusicfile].wav". It isn't specified as an error message and I can still play other tracks with "/music music/[nameofmusicfile]" as usual.
The problematic track is a normal 22Khz stereo 16 bit .wav-file having approximately 15 MBs.
So why won't Q3A play that thing? Hope it's not because of the track lenght...

Re: music/sound problem in Q3A

Posted: Wed Nov 19, 2008 3:55 pm
by Kaz
It needs to be PCM, open it up in windows sound editor and save it with the correct settings.

Re: music/sound problem in Q3A

Posted: Wed Nov 19, 2008 5:26 pm
by monaster
The problem is, that it already is PCM formatted - I forgot to mention that, sorry, Kaz! At first, it was an audio soundtrack I splitted from a .wmv and then saved as mp3 before finally converting it to the spoken of wav. Could it be that the 15MBs are just too big for Quake3 to handle? I'm completely stuck with that problem... :paranoid:
[EDIT: spelling mistake corrected]

Re: music/sound problem in Q3A

Posted: Wed Nov 19, 2008 7:14 pm
by obsidian
I doubt it's "too big" but try saving a copy of it cropped to something short and see if that works.

Re: music/sound problem in Q3A

Posted: Thu Nov 20, 2008 4:27 am
by ^misantropia^
If it were too big Q3A would complain with an 'Out of memory' error. You said it's a 22kHz with 16 bits per sample. Did you save it as little-endian PCM?

Re: music/sound problem in Q3A

Posted: Fri Nov 21, 2008 11:46 am
by monaster
I finally managed to figure out what the problem was:
The quake 3 wav loader seems to be a bit limited in the data it can handle. Instead of searching through chunks based on the lengths in the file, it just looks at every 4 bytes in turn looking for the chunk headers. This doesnt work if a chunk before the DATA chunk is not a multiple of 4 bytes long - for example the fmt chunk on newer WAV files. When loading music it seems even more restricted, in that it appears to assume the DATA chunk will immediately follow the fmt chunk.
This causes quake3 to report "No data chunk in <filename>" on the console when it tries to load the wav file.
A nice little programme to fix the issue is available under THISlink. There you'll also find the explanation I've posted here. I tested that thing and it works perfectly (~6kb of size if I remeber correctly), I can finally play the music I wanted!

Re: music/sound problem in Q3A

Posted: Fri Nov 21, 2008 1:48 pm
by ^misantropia^
That's a bug worth fixing. Do you happen to have a sound sample that exposes it?

Re: music/sound problem in Q3A

Posted: Tue Dec 02, 2008 10:38 am
by monaster
@^misantropia^:
Unfortunately, I've deleted every 'bugged' music file afterwards, but I can try to create something like that using the same procedure again. Interested?

Re: music/sound problem in Q3A

Posted: Tue Dec 02, 2008 5:40 pm
by ^misantropia^
I am and thanks in advance.

Re: music/sound problem in Q3A

Posted: Sat Feb 14, 2009 5:51 pm
by monaster
Well, I first have to find a new webspace where I can upload that music track, sorry for having you wait so long. :(
I'll inform you as soon as I can upload it again (I have in fact had it uploaded already but forgot to mention it here too, embarrassing... and now that I have thought of it again lycos closes and forced me to remove everything..., sorry, ^misantropia^).
By the way: screenshots I may have posted in this forum in the past were also lying on my tripod account, they'll be gone as well; at least for some time...

Re: music/sound problem in Q3A

Posted: Sat Feb 14, 2009 7:30 pm
by Hipshot
Mail me the wav and I'll host it for you?

Re: music/sound problem in Q3A

Posted: Sun Feb 15, 2009 7:32 pm
by monaster
Thanks, Hipshot, just found out that lycos continues anyway... :smirk:
I'll re-upload all the stuff in the next few days and then it is available again.

Re: music/sound problem in Q3A

Posted: Fri Apr 17, 2009 4:15 pm
by monaster
Finally I was able to upload an example of a buggy music file that will produce a "no data chunk in [nameofmusicfile].wav" error inside Quake 3, hell yeah! Here you go, ^misantropia^, have fun with it studying that bug... if you're still interested in it after such a long time :p
The URL to get it from is this one . Tell me when you downloaded that thing, I'll delete it afterwards.

[EDIT: Quickly changed the link, it works now.
EDIT2: It doesn't due to some lycos restrictions, it doesn't pose too much of a problem though: just type the linked address into your browser and the download window shows up.]

Re: music/sound problem in Q3A

Posted: Fri Apr 17, 2009 8:26 pm
by ^misantropia^
Thanks. Downloaded it and going to check it out.

Re: music/sound problem in Q3A and how to solve it

Posted: Sun Apr 19, 2009 12:34 pm
by monaster
You're welcome. To obsidian & Co: I changed the topic subject and the post icon so that everybody knows that the problem has been solved. Hope this goes ok with any q3w rules, since I never did this before (I mean changing subjects, not solving problems :tard: ).

Re: music/sound problem in Q3A and how to solve it

Posted: Sun Apr 19, 2009 5:00 pm
by obsidian
That's cool. Thanks for taking the initiative.

Re: music/sound problem in Q3A and how to solve it

Posted: Sun Apr 19, 2009 5:53 pm
by pjw
Thanks for following through with it too. :)

It makes me crazy when someone posts about a problem, and then posts "Nevermind, figured it out." and never posts again. That helps no one who has the same problem... :miffed: