Commit Graph

65 Commits

Author SHA1 Message Date
abcdefg30
6a31b1f9f3 Update the copyright header year 2022-05-28 00:35:10 -05:00
abcdefg30
660130653c Use TryGetValue instead of ContainsKey and a lookup for cached sounds 2022-05-22 10:39:27 -05:00
abcdefg30
ea04a7fec5 Clear cached notifications when initializing a new map/mod 2022-05-22 10:39:27 -05:00
abcdefg30
9d481854f3 Make currentSounds readonly 2022-05-22 10:39:27 -05:00
Eduardo Cáceres
7eb64ea6fc Use read-only autoimplemented property when possible 2022-05-18 11:42:36 -05:00
penev92
8b944e9c82 Added audio playback to the AssetBrowser 2022-01-09 18:40:32 +01:00
Matthias Mailänder
718bf88b9a Remove superflous null checks
and cache a dictionary lookup.
2022-01-06 01:54:27 +01:00
Matthias Mailänder
5fcc049040 Fix a null reference exception. 2021-12-08 21:07:19 +01:00
Ivaylo Draganov
695b7865d3 fixup! Add support for non-overlapping sound notifications 2021-11-29 23:44:59 +01:00
Ivaylo Draganov
fa6ff32f65 Add support for non-overlapping sound notifications 2021-11-29 23:44:59 +01:00
Matthias Mailänder
9b1cec7712 Add support for gapless looping music. 2021-11-11 23:49:54 +01:00
Andre Mohren
6810469634 Updated copyright years. 2021-06-29 18:33:21 -05:00
teinarss
10676be377 Replace F extension with string interpolation 2021-05-08 22:20:59 +02:00
Paul Chote
d52ba83f96 Replace terniary null checks with coalescing. 2021-03-08 18:11:25 +01:00
teinarss
4a1e4f3e16 Use expression body syntax 2021-03-07 13:00:52 +00:00
teinarss
ed295ae315 Change throw exceptions to use nameof in parameter 2021-02-28 18:43:51 +01:00
teinarss
9c4fd0e3d3 Use Null-Propagation Operator 2020-08-19 18:11:07 +01:00
teinarss
27f1a7ab27 Use out var syntax 2020-08-19 18:11:07 +01:00
abcdefg30
23b3c237b7 Update the year numbers in all license headers to 2020 2020-01-05 17:00:34 +00:00
Abdurrahmaan Iqbal
72eb4e1749 Fix #17230: Dummy audio output class 2019-11-14 23:46:14 +01:00
Paul Chote
bb324fb2d4 Add Sound.DisableAllSounds property. 2019-04-20 14:54:48 +02:00
abcdefg30
1bb319425b Add Sound.Play overloads that play a random sound from a list 2019-04-20 01:22:30 +02:00
Paul Chote
b71c080285 Add VolumeModifier support to music. 2019-02-02 22:32:29 +01:00
Paul Chote
cbe3733deb Add VolumeModifier support to sound definitions. 2019-01-27 15:05:27 +01:00
abcdefg30
cadbd0d9ab Change the year number in all cs headers from 2018 to 2019 2019-01-26 23:15:21 +01:00
Arular101
8a60918841 Update copyright notice year to 2018 2018-01-17 00:47:34 +01:00
RoosterDragon
5d8c9a560a Release audio resource for video when StopVideo is called. 2017-12-19 00:57:58 +01:00
RoosterDragon
85c948fd8d Add a streaming audio playback interface.
This allows audio to be streamed, rather than needed to be fully loaded into memory.
2017-07-14 23:02:49 +01:00
rob-v
6df7f18a3b Fix Initialize sounds (dispose of null SoundSource) 2017-06-24 11:29:55 +01:00
rob-v
8276b17570 Fix Sound memory leak (OutOfMemoryException), remove Music caching to free memory 2017-06-12 18:33:53 -05:00
Paul Chote
61050e77f6 Fix PlayLooped ignoring world position. 2017-02-03 21:59:32 +00:00
Taryn Hill
43317e0f5d Update copyright notice year to 2017 2016-12-31 23:46:13 -06:00
RoosterDragon
226c0a050a Dispose some sound streams. 2016-12-23 19:37:17 +00:00
Paul Chote
443c3ee72d Disable sound on the shell maps. 2016-12-23 11:34:23 +00:00
Paul Chote
9ddfdc45b3 Introduce SoundType enum. 2016-12-23 11:34:23 +00:00
Taryn Hill
51dd79261f Fix enumeration in Sound::LoadSound to use the ISoundLoader[] param 2016-11-18 20:23:15 -06:00
abcdefg30
16776e8a97 Fix the music resetting from time to time 2016-09-17 19:43:09 +02:00
Turupawn
bbac9ac61a Same unit command sounds wont overlap anymore
Responding to Travis inquiries

Changed Hashtable for Ditctionary + avoiding code duplication

More small code nits

another nit
2016-08-12 18:15:49 -06:00
Paul Chote
5a7a69a875 Tidy muting code. 2016-08-06 19:53:50 +01:00
Paul Chote
9437a86e7e Remove legacy sound code and simplify platform init. 2016-08-06 19:53:50 +01:00
Paul Chote
345f91d3ec Remove the null renderer. 2016-03-30 19:40:19 +01:00
teees
0193ee5b3c Object oriented sound loader approach
Reshapes the ISoundLoader interface and
adds a new ISoundFormat interface to allow streaming in the near future
2016-03-12 12:50:52 +00:00
Paul Chote
e71225496b Clarify GPL version. 2016-02-21 16:30:48 +00:00
Paul Chote
b396965fd9 Update licence header year. 2016-02-21 16:27:31 +00:00
Paul Chote
b9f8301959 Use IReadOnlyFileSystem in Sound code. 2016-02-18 18:12:32 +00:00
Matthias Mailänder
047f71e5ec Reset stream position after TryParseSound failures 2016-01-15 18:29:25 +01:00
Pavel Penev
0e53312a1d Add a package-oriented Platform.ResolvePath() method 2016-01-10 23:19:28 +02:00
DArcy Rush
67f88e368f Add mute option to the game 2015-12-25 23:33:18 +00:00
Pavel Penev
8d56de80ca Add ISoundLoader
The interface is to be implemented by all sound loaders, just like ISpriteLoader. All loading goes through the interface. This would allow mods to create their own sound loaders outside the engine.
Also add a SoundFormats property to mod.yaml, where mods can define what sound loaders they will need.
This requires Game.Sound to be initialized after the ModData is loaded.
2015-12-20 19:17:48 +02:00
Pavel Penev
1b88d24cfa Unstatic GlobalFileSystem and rename it to FileSystem
Add a ModFiles field on ModData and move all access to the file system to go through that.
2015-12-14 03:42:22 +02:00