• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Import] Warcraft 3 Audio Formats

Status
Not open for further replies.
Level 16
Joined
Mar 27, 2011
Messages
1,349
Hi everyone,

As I understand it, Warcraft 3 only supports .mp3 and .wav audio files. .wav files are too large (because they're uncompressed) and .mp3 encoding adds silence to the beginner of the audio file which makes it incompetent at looping continuous tracks.

More Technical Discussion on .mp3 silence: Information : Ars Technica OpenForum :

I've done quite a lot of research and can see no solution to implementing continuous looping tracks, short of writing a custom Warcraft 3 music system which keeps time of tracks and auto resets the music. With the number of songs I have, some of which have multiple independent sections, this is a tedious use of time and I can't imagine it would be as accurate as having a proper audio file.

I heard that Warcraft 3 now has a new sound engine, the same as Starcraft 2? If this is true, is there any word on support for a new audio format like .ogg? I think Starcraft 2 uses .ogg files. I'm fairly sure .ogg would solve my problem.
 
They haven't added any file formats with the upgrade, but it could be worthwhile making a post about requesting .ogg support in the Warcraft 3 Patch Wish List thread.

In the meantime, have you tried using Warcraft 3's sound channels? (SetSoundChannel) Or the native SetSoundPlayPosition?

I haven't experimented with those natives much, but you could make a system to loop a song by playing it first on channel 7, and then starting another one on channel 8 just before the first one ends. Then you can swap back after the second one ends.

As for the SetSoundPlayPosition approach, you can try to fast-forward enough millisecs to get past the initial silence. Note that you have to call this immediately after you start the sound, otherwise it won't work. Let me know if either of these work, or if you have any questions.
 
Status
Not open for further replies.
Top