<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://staging-wiki.unvanquished.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Knova</id>
	<title>Unvanquished - User contributions [en-gb]</title>
	<link rel="self" type="application/atom+xml" href="https://staging-wiki.unvanquished.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Knova"/>
	<link rel="alternate" type="text/html" href="https://staging-wiki.unvanquished.net/wiki/Special:Contributions/Knova"/>
	<updated>2026-04-04T19:45:09Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.8</generator>
	<entry>
		<id>https://staging-wiki.unvanquished.net/index.php?title=Formats/Audio&amp;diff=1097</id>
		<title>Formats/Audio</title>
		<link rel="alternate" type="text/html" href="https://staging-wiki.unvanquished.net/index.php?title=Formats/Audio&amp;diff=1097"/>
		<updated>2012-11-14T22:58:18Z</updated>

		<summary type="html">&lt;p&gt;Knova: /* Sound replacement progress */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Licensing==&lt;br /&gt;
&lt;br /&gt;
The following licenses are suitable for music and sounds:&lt;br /&gt;
&lt;br /&gt;
* [http://creativecommons.org/licenses/sampling+/1.0/ CC-Sampling Plus]&lt;br /&gt;
* [http://creativecommons.org/licenses/by-sa/2.0 CC-BY-SA] (v2.0 or newer)&lt;br /&gt;
&lt;br /&gt;
==Sound replacement progress==&lt;br /&gt;
&lt;br /&gt;
Please see the [[Sound_Progress|full article]].&lt;br /&gt;
&lt;br /&gt;
KNova was given access by cron to the sound/music dropbox, so he is slowly working on replacing all the sounds.&lt;br /&gt;
&lt;br /&gt;
==Configuration files==&lt;br /&gt;
&lt;br /&gt;
===Buildables===&lt;br /&gt;
&lt;br /&gt;
There are 14 animations (animation types) per buildable (buildable type): ''construct1'', ''construct2'', ''idle1'', ''idle2'', ''idle3'', ''attack1'', ''attack2'', ''spawn1'', ''spawn2'', ''pain1'', ''pain2'', ''destroy1'', ''destroy2'', and ''destroyed''. Note that not all of these are used for a given buildable and the spawn2 and destroy2 sounds are never used; see the [[Exporting_Models#MD5_4|model exporting guide]] for more information. Each buildable has a sound configuration file, located at ''sound/buildables/&amp;lt;var&amp;gt;&amp;lt;buildable&amp;gt;&amp;lt;/var&amp;gt;/sound.cfg'', that describes two properties for each buildable animation:&lt;br /&gt;
* whether a unique (buildable-specific) sound is associated with the given buildable animation, and&lt;br /&gt;
* whether the animation's sound is to be played in a loop.&lt;br /&gt;
Such a file should contain a &amp;lt;em&amp;gt;1&amp;lt;/em&amp;gt; for a &amp;lt;em&amp;gt;yes&amp;lt;/em&amp;gt; answer and a &amp;lt;em&amp;gt;0&amp;lt;/em&amp;gt; for a &amp;lt;em&amp;gt;no&amp;lt;/em&amp;gt; answer, for the above 2 questions, in the given order, for each buildable animation. Technically, this means that the file should contain 28 integers (2 per animation). However, by convention, 1 line is used for each animation, and comments are added for guidance about which animation a pair of numbers refers to.&lt;br /&gt;
&lt;br /&gt;
{{Note|header = Engine Developer Note|disregardby = sound designers|content =&lt;br /&gt;
&lt;br /&gt;
Filenames for sounds for buildable animations are enumerated in the &amp;lt;code&amp;gt;cg_buildableSoundNames&amp;lt;/code&amp;gt; array in [https://github.com/Unvanquished/Unvanquished/blob/master/src/gamelogic/game/bg_public.h src/gamelogic/game/bg_public.h]. Buildable sound files are loaded in CG_InitBuildables() in [https://github.com/Unvanquished/Unvanquished/blob/master/src/gamelogic/cgame/cg_buildable.c src/gamelogic/cgame/cg_buildable.c].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
So each line in a buildable sound configuration file is formatted as follows:&lt;br /&gt;
 &amp;lt;var&amp;gt;&amp;lt;unique&amp;gt;&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;&amp;lt;loop&amp;gt;&amp;lt;/var&amp;gt; //&amp;lt;var&amp;gt;&amp;lt;filename&amp;gt;&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of a full buildable sound configuration file is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1 0 //construct1.wav&lt;br /&gt;
0 0 //construct2.wav&lt;br /&gt;
1 1 //idle1.wav&lt;br /&gt;
0 0 //idle2.wav&lt;br /&gt;
0 0 //idle3.wav&lt;br /&gt;
0 0 //attack1.wav&lt;br /&gt;
0 0 //attack2.wav&lt;br /&gt;
0 0 //spawn1.wav&lt;br /&gt;
0 0 //spawn2.wav&lt;br /&gt;
0 0 //pain1.wav&lt;br /&gt;
0 0 //pain2.wav&lt;br /&gt;
1 0 //destroy1.wav&lt;br /&gt;
1 0 //destroy2.wav&lt;br /&gt;
0 0 //destroyed.wav&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Again, the comments only help human readers, and are indifferent to the game (do &amp;lt;em&amp;gt;not&amp;lt;/em&amp;gt; reorder the lines!).&lt;br /&gt;
&lt;br /&gt;
If, for a particular buildable, a unique sound is associated with a particular animation, then the game will look for the buildable-specific ''sound/buildables/&amp;lt;var&amp;gt;&amp;lt;buildable&amp;gt;&amp;lt;/var&amp;gt;/&amp;lt;var&amp;gt;&amp;lt;animation&amp;gt;&amp;lt;/var&amp;gt;.wav'' audio file, and otherwise (and also if the buildable-specific audio file cannot be found) the game will use the default ''sound/buildables/&amp;lt;var&amp;gt;team&amp;lt;/var&amp;gt;/&amp;lt;var&amp;gt;&amp;lt;animation&amp;gt;&amp;lt;/var&amp;gt;.wav'' (based on the team of the buildable).&lt;br /&gt;
&lt;br /&gt;
==Sound filenames==&lt;br /&gt;
&lt;br /&gt;
A list of all the sound filenames currently in use is available on the [[Sound_Progress|sound progress]] page.&lt;br /&gt;
&lt;br /&gt;
* The structure &amp;lt;code&amp;gt;cg_customSoundNames&amp;lt;/code&amp;gt; in [https://github.com/Unvanquished/Unvanquished/blob/master/src/gamelogic/cgame/cg_players.c src/gamelogic/cgame/cg_players.c] contains a list of some sounds.&lt;br /&gt;
* Sounds for weapons are controlled by the [[Exporting_Models#Weapons_2|weapon configuration file]].&lt;br /&gt;
* A number of sounds are loaded in &amp;lt;code&amp;gt;CG_RegisterSounds()&amp;lt;/code&amp;gt; in [https://github.com/Unvanquished/Unvanquished/blob/master/src/gamelogic/cgame/cg_main.c src/gamelogic/cgame/cg_main.c].&lt;/div&gt;</summary>
		<author><name>Knova</name></author>
	</entry>
</feed>