Commit Graph

60 Commits

Author SHA1 Message Date
hiker
86b8036926 Fix #1631 (SFX can not be enabled in in-race game menu). 2014-10-22 17:16:39 +11:00
hiker
690ad4ce95 Fixed sfx direction. 2014-10-21 22:07:22 +11:00
hiker
c7d7e17ff9 Handle setMasterVolume in sfx thread. 2014-10-21 08:28:41 +11:00
hiker
8b7bf28e0f Fixed #1147 - sounds should stopped when they are disabled in option screen.
Fixed by explicitely stopping all non-looped sfx.
2014-10-20 22:37:19 +11:00
hiker
36ea7f30bf Only restart sfx if they were really paused. 2014-10-20 09:43:05 +11:00
hiker
11dbb6f062 Fixed some warnings printed when sfx are disabled. 2014-10-20 00:05:48 +11:00
hiker
3082267eb4 Properly test for sfx disabled, and only schedule events if sfx
are enabled. Fixes #1629.
2014-10-18 12:11:02 +11:00
hiker
19f9afb67f Manually keep track of the duration each sfx has been played (instead
of relying on the world clock, which can run backwards, e.g. in
FTL mode). Fixes #1624.
2014-10-18 11:46:22 +11:00
hiker
813edc7ddf Remove SFX_INITIAL state. 2014-10-17 12:00:00 +11:00
hiker
a40d6d8a00 Removed isPlaying function, and use getStatus instead. 2014-10-17 08:27:40 +11:00
hiker
3d15f13c74 iFixed #1624 (though it is a bit of a hack). 2014-10-16 23:45:09 +11:00
hiker
a18766e3e6 Handle looping in sfx thread. 2014-10-16 16:57:12 +11:00
hiker
7e4e857b41 Improve situation of #1624 - it should only happen now if you pause the
game in the first one or two seconds after start (still wip).
2014-10-15 23:38:13 +11:00
hiker
8fcc373b2a Add volume, speed, and position settings to be done by the sfx
thread. Removed more unnecessary error checks (which mostly flood
stdout with 'not playing ...' messages), and renamed volume, position
and speed to setVolume, setPosition and setSpeed.
2014-10-15 07:55:18 +11:00
hiker
22633aa363 Avoid calling querying the openal status in getStatus (which causes
a slowdown of sfx).
2014-10-14 09:01:26 +11:00
hiker
665f146923 Moved SFXStatus enum to SFXBase. 2014-10-14 08:05:04 +11:00
hiker
bfe84612fa Let all SFX commands be handled by the sfx manager thread (otherwise
events could be handled in the wrong order, e.g. a delete from the
main thread before the play in the manager thread, resulting in a crash).
Should fix #1511 and #1604.
2014-10-13 08:26:45 +11:00
hiker
216575a732 Started to let all sfx related command be executed from the sfx manager
to avoid race condition and crashes.
2014-10-11 11:55:02 +11:00
hiker
61068c7278 Replaces sfx->getStatus with isPlaying() functi n which is faster
(for #1511).
2014-10-10 16:45:29 +11:00
Flakebi
069853b11f Fix #1153 Cleanup logging code 2014-10-07 20:54:54 +02:00
hiker
c147dacbc2 Queue up sfx instead of starting them immediately. Preparation for
threading the sfx manager.
2014-09-18 11:43:26 +10:00
hiker
86b351fbf4 Turn sfx_manager into a singleton. 2014-09-17 21:38:21 +10:00
auria
6b7e33a267 Convert a bunch of prints to our logging system, it's long overdue we fix that
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14874 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2014-01-01 19:11:01 +00:00
hikerstk
b074dc5f09 Moved all VS specific math code (i.e. for round(), isnan) into vs.hpp
and used it everywhere (I hope).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14640 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-12-06 03:49:55 +00:00
hikerstk
c5b8732087 Probably biggest commit (in terms of number of files) ever -
updated the (c) line of all files to -2013, added missing (c), 
changed format in some cases so that it will be easier in
the future to change them by script. No actualy code change.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14447 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-11-15 11:43:21 +00:00
auria
001da20f42 Fix audio master volume bug
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14107 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-09-19 23:46:51 +00:00
hikerstk
5efb8a0828 Fixed windows compilation.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@13636 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-09-06 10:59:07 +00:00
curaga
cb9017d5e8 Sigh. Yet Another VS Workaround.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@13620 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-09-03 08:28:44 +00:00
curaga
c353dc1013 Don't pass NaNs to OpenAL
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@13585 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-08-28 13:50:20 +00:00
curaga
b56bf4dc53 Remove trailing space, git doesn't like it
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@12797 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-05-29 22:04:35 +00:00
auria
78d964b79d try to fix sound leaks
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@12222 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-12-09 23:30:26 +00:00
auria
65d897915a Manually implement muting sounds when too far since OpenAL doesn't seem to have that feature, and use it to finally make the spaceship sound in the intro work
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11422 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-07-22 20:05:38 +00:00
auria
9f909b4c26 undo my attempts at configuring the attenuation model per-source, after closer inspection OpenAL doesn't support what I was trying to do :(
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11421 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-07-22 19:20:41 +00:00
auria
1574ff472d Add specifying SFX rolloff type
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11356 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-06-30 18:49:35 +00:00
auria
92eb0ebd2a Ran a small bash script to remove all of those annoying strings. The only thing they gave us were the need to rebuild after committing
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10363 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-12-06 18:43:36 +00:00
auria
9afdcfaf50 Apply patch that is a bit similar to what xapantu did, but in a IMHO more modular way
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10264 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-11-27 01:14:16 +00:00
auria
a44adb6e6c Allow per-track sounds for emitters
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9431 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-08-06 20:37:54 +00:00
auria
a4b954f2ea Add some support for sound emitters on tracks
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9430 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-08-06 19:51:12 +00:00
auria
c66ada8168 Suppress annoying warning
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@8589 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-05-15 18:28:07 +00:00
hikerstk
8b22aba2b5 Removed warning that are constantly printed on stdout if sfx
are disables (Auria, I assume this is the right way to do
this?)


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@8351 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-04-14 11:49:47 +00:00
auria
cdc61fda1e Fixed non-positional bridge sound in canyon
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@8338 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-04-13 20:59:22 +00:00
auria
2df77fbc5e Fixed machine gun effect when riding on zipper ramps
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@6576 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-11-15 19:15:34 +00:00
auria
1cb2b1caa3 Fixed sound being shortly unpaused when switching screen and sound is off
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@6265 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-10-11 23:12:30 +00:00
auria
bad35f1595 Enable looped sounds only when unpausing sounds and not as soon as the checkbox is pressed
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@6261 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-10-11 22:35:58 +00:00
auria
12cb80f9d0 Enabling sound in-game works even for engines / looped sounds now
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@6255 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-10-11 20:26:31 +00:00
auria
7434604183 Fixed sound to be positional again
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@6254 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-10-11 19:46:04 +00:00
auria
65fdc2f2ee Link each Sound Source to a Buffer, even if OpenAL is not inited. This will help correct the SFX enable bug
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@6244 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-10-11 02:00:36 +00:00
hikerstk
0502408d60 Terrain-specific sfx will now not be cut off when the terrain is left, instead
the sfx will finish.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5556 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-06-24 23:10:25 +00:00
hikerstk
4fa02b5325 Fixed crash when the openal device could not be initialised. STK should now
work when sound is enabled, but the openal device does not work.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5071 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-03-25 22:14:49 +00:00
auria
93cc5209f7 Converted sound effects file to XML. Along the way, refactored the audio code to be more flexible. before, when a sound changed, you needed to edit the config file of STK, edit the enum in the header, edit the loader in the .cpp... was annoying. Now you only need to edit the config file.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4728 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-02-15 19:17:35 +00:00