Fabian Woltermann
659828c213
If no flyby sounds are defined for a species, do not attempt to play any.
2018-01-04 11:10:06 +01:00
asarium
0ff8a2c159
Add support for multiple sounds in one game sound entry
...
This adds support for specifying multiple sounds for a single game sound
entry. The engine then selects which sound will be played based on the
strategy provided by the game data. This required a few changes to some
of the game code since previously every game sound had exactly one sound
file attached to it. The most notable change is that it is no longer
possible to determine the exact duration a sound can have so instead the
new code computes the maximum duration a sound can have and uses that
where appropriate.
This also adds support for randomizing the pitch and volume of the sound
to provide a more varied experience even if only a single sound is used.
One possible issue that exists is that the "sequential" strategy only
works globally at the moment so if two sources use the same game sound
concurrently then the two sources will share the sequence of sounds
since there is no sound instance data at the moment. That can be added
in a future change but should not present a huge issue for most
use-cases.
Visual Studio on Appveyor somehow causes deprecation error on _our_
definition of vsprintf. I have no idea why these changes introduced this
warning but I won't debug Visual Studio compiler bugs that I can't
reproduce with my Visual Studio version so I just disabled those
warnings.
2017-10-17 10:57:22 +02:00
asarium
8272304cfa
Remove global Snds and Snds_iface vector
2017-10-17 10:30:00 +02:00
asarium
0522566790
Replace direct usages of Snds vector with a function call
...
This will make it easier to validate the used handles and is generally
better since it doesn't require a global sounds vector.
2017-10-09 15:02:29 +02:00
asarium
0a7800d3ea
And another batch of warning fixes
2016-08-15 18:55:35 +02:00
Fabian Woltermann
e1ba2256ed
Changes the subsystem flags to the new flag system.
2016-08-13 13:52:51 +02:00
Fabian Woltermann
770fce8de5
Bitset flags -- take 2 ( #775 )
...
This introduces a new mechanism for handling bit flags. Instead of using an int (or two, or three) to write bits into, this uses the std::bitset in a wrapper class that accepts an enum class as input. This means that certain classes of errors we've had a few of in the engine, where a coder used the wrong set of flags or checked them against the wrong variable (SF_STEALTH vs SIF_STEALTH, for example) can now be detected at a compiler level rather than not at all.
2016-08-12 16:13:50 -07:00
The E
a413255728
Renaming vm_vec_dotprod to vm_vec_dot
2015-12-01 20:35:47 +01:00
Echelon9
29faabdfb3
Simplify duplicative object/ includes.
2015-06-22 20:24:31 +10:00
Echelon9
c5493bb480
Scripted sort and uniq on (internal) project includes. Improves search time and as a by product removed a number of duplicative includes.
2015-06-22 20:24:30 +10:00
jg18
7fe5ba8db8
Make enhanced sound on by default.
2015-06-01 11:18:07 -07:00
jg18
ad910280e7
Add support for enhanced sound.
...
Add support for enhanced in-mission sound, with 128 audio channels and a
new system for specifying per-sound priorities and concurrent playback
limits using modular extensions of soudns.tbl.
2015-05-29 23:05:30 -07:00
Lari Nieminen
54a2a3ea5b
Fixed stupid syntax error.
2015-05-18 00:49:31 +03:00
Lari Nieminen
56273906b7
Fixed incorrect volume ramping.
2015-05-17 17:04:57 +03:00
Lari Nieminen
a44daaba35
Added $Minimum Engine Volume to ships.tbl, with which to customize how the ship's speed affects engine sound volume.
2015-05-17 03:33:46 +03:00
MageKing17
1591237acf
Reverting recent string of commits.
...
Since they didn't go through code review (and break compilation), reverting the recent string of commits (just used "git revert -n 5042c44..05b4635").
2015-04-29 16:19:59 -07:00
zookeeper
0656175a72
Added a $Minimum Engine Volume ship table entry for specifying the minimum engine sound volume used when ship is stationary.
...
git-svn-id: svn://svn.icculus.org/fs2open/branches/zookeeper@10609 387891d4-d844-0410-90c0-e4c51a9137d3
Conflicts:
code/object/objectsnd.cpp
2015-04-29 23:04:23 +03:00
MageKing17
ec88fdbae1
Minor objectsnd.cpp cleanup.
...
Should be all nonfunctional changes (yes, even those "else" branches that look like they change behavior; functionally speaking, those branches shouldn't get hit because FSO will delete the sounds when they shouldn't apply).
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@11322 387891d4-d844-0410-90c0-e4c51a9137d3
2015-04-23 12:09:10 +10:00
z64555
8d5fbab768
z64555's debug console. Take 2. Includes changes to most (not Xcode) project files to include the added files of r10621
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@10622 387891d4-d844-0410-90c0-e4c51a9137d3
2014-05-08 19:18:37 +10:00
The_E
98355da7d5
Revert 10619: Missing files
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@10620 387891d4-d844-0410-90c0-e4c51a9137d3
2014-05-08 19:18:36 +10:00
z64555
2b2ba832f8
z64555's debug console.
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@10619 387891d4-d844-0410-90c0-e4c51a9137d3
2014-05-08 19:18:36 +10:00
Echelon9
3b19fab1c1
Fix Coverity 1093446 Dereference after null check: In obj_snd_stop_all(): Pointer is checked against null but then dereferenced anyway (CWE-476). From Flaming_Sword.
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@10390 387891d4-d844-0410-90c0-e4c51a9137d3
2014-02-02 10:52:50 +10:00
Echelon9
0288075eb0
Fix Coverity 1093392 Logically dead code: In obj_snd_assign(int, int, vec3d *, int, int, ship_subsys *): Code can never be reached because of a logical contradiction (CWE-561). From Flaming_Sword.
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@10388 387891d4-d844-0410-90c0-e4c51a9137d3
2014-02-02 10:52:50 +10:00
Echelon9
690460df8e
Fix Mantis 2824: AddressSanitizer: global-buffer-overflow in obj_snd_delete_all()
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@9644 387891d4-d844-0410-90c0-e4c51a9137d3
2013-06-11 19:22:14 +10:00
Goober5000
a916633b46
onlyjob's spelling fixes, per Mantis #2777
2013-01-13 09:50:08 +00:00
Echelon9
c1121a56bb
Fix: Format string is not a string literal (potentially insecure)
2012-10-08 15:17:43 +00:00
The_E
49466254c7
Change this little piece of code to avoid a potentially very baffling null pointer dereference later on
2012-05-05 12:50:06 +00:00
Echelon9
6ed3ce07d7
warning C6011: Dereferencing NULL pointer 'lowest_vol_osp'
2012-04-11 14:44:05 +00:00
Echelon9
164581168d
Fix Mantis 2632: Sounds assigned to objects get dropped when limit hardcoded gets reached. Patch from m_m
2012-04-02 21:32:47 +00:00
The_E
747841add1
Make the OS_SUBSYS_ROTATION sound depend on the SSF_ROTATES flag
2012-02-04 22:08:45 +00:00
The_E
b8c1a68989
Makes the $AliveSnd, $DeadSnd and $RotationSnd entries for subsystems work. NOTE: This will apparently not work correctly for nested subsystems.
2012-02-04 21:50:49 +00:00
Goober5000
0c945c210d
revert Echelon9's commit 6754 which needs to be discussed first
2010-11-23 08:27:18 +00:00
Echelon9
5bf9697227
Fix a range of potential NULL dereferences
2010-11-20 12:22:03 +00:00
The_E
3d3fbb3002
Fixes a crash when "Test Load Ship" was used with a ship that has turrets with rotation sounds defined.
2010-08-25 20:24:34 +00:00
taylor
b287ecfef9
new sound code
...
- Mantis #58
- Mantis #1769
- many other fixes and improvements
2010-05-29 15:53:18 +00:00
portej05
719825f80d
The big CVS comment removal. This chops approx. 3.5mb off a full checkout.
...
I've tested this through compiling and through hand checking.
Normalises line endings in ALL files to \n.
2009-06-20 08:08:20 +00:00
Wanderer
cb3085e58c
merge from wanderer branch - subsys/turret sounds
2009-05-20 12:24:45 +00:00
WMCoolmon
525e45db77
Updated objsnd API
2008-08-30 10:46:23 +00:00
Backslash
cf6cfa6538
Fix to not play the flyby sound repeatedly for a stupid reason when viewing from another ship. (The player is NOT always the center of the universe.)
2008-05-26 06:59:00 +00:00
wmcoolmon
def1993de8
Miscellaneous minor changes, mostly related to addition of Current_camera variable
2006-04-03 07:48:03 +00:00
taylor
7032e999c8
fix crashes and minor slowdowns when sound is disabled (-nosound)
2005-10-23 19:08:01 +00:00
Goober5000
81784bfa63
hopefully complete species upgrade
...
--Goober5000
2005-09-25 05:13:07 +00:00
Goober5000
5c6738a534
fixed a bunch of "issues" caused by me with the species stuff
...
--Goober5000
2005-07-13 02:01:30 +00:00
Goober5000
76d05268fd
improved species support and removed need for #define
...
--Goober5000
2005-07-13 00:44:24 +00:00
wmcoolmon
c73e870650
subsystem sounds
2005-04-25 00:28:58 +00:00
taylor
7f786136a6
s/vector/vec3d/g, better support for different compilers (Jens Granseuer)
2005-04-05 05:53:25 +00:00
Kazan
864e1b5922
remove MCD complete
2004-07-26 20:47:56 +00:00
Kazan
428b3dcbc9
MCD - define _MCD_CHECK to use memory tracking
2004-07-12 16:33:09 +00:00
Goober5000
7ef2ab2e39
Uber pass at reducing #includes
...
--Goober5000
2004-03-05 09:02:13 +00:00
Goober5000
4214c8c99f
fixed some misspellings
...
--Goober5000
2003-03-18 01:44:31 +00:00