Anders Jenbo
7cb73a6717
Minimize impact of NOSOUND
2021-08-30 10:57:59 +02:00
Vladimir Olteanu
8fcd21e0b5
music.cpp: make musicBuffer a unique_ptr
2021-08-17 17:47:07 +02:00
Anders Jenbo
de0b3a38b8
Apply code style
2021-07-20 02:51:39 +02:00
Anders Jenbo
e5fc7fd17c
Move remaning symbols in to anonymous namespaces
2021-07-20 02:51:39 +02:00
Anders Jenbo
0889780923
Remove more usage of miniwin types
2021-07-18 02:11:58 +02:00
JoBergeron
be3f1ba928
Pause game and mute music when game window loses focus ( #2337 )
2021-07-10 04:21:27 +02:00
Anders Jenbo
9ebdb6db69
General clean up
2021-07-08 03:30:25 -07:00
Anders Jenbo
a7c7fa0030
Fully apply clang-tidy/format to all files
2021-07-03 16:41:43 -07:00
Anders Jenbo
129342d07a
Clang-tidy: GlobalConstantCase
2021-07-02 22:56:56 +02:00
Anders Jenbo
f167bd4dfb
Clang-tidy: llvm-include-order
2021-06-27 01:45:49 +02:00
Gleb Mazovetskiy
f9f301b054
🚚 engine.h: Extract Point, Direction, clamp
...
`engine.h` is getting quite bloated. Moves this code to their own files.
2021-06-21 01:36:20 -07:00
Gleb Mazovetskiy
e72def02e6
🔨 Add STREAM_ALL_AUDIO build setting
...
For extremely memory-constrained devices. Gets into town on RG99 (18 FPS -> 14 FPS).
2021-05-23 05:03:14 +02:00
Gleb Mazovetskiy
c79ec673f4
♻️ Implement std's Lockable for SDL mutex wrapper
...
Rather than rolling our own lock guard, implement the requirements for
using `std::lock_guard` et al and use that.
2021-05-17 12:00:09 +02:00
Anders Jenbo
a095bc0bf7
♻️ Migrate more code away from miniwin
2021-05-13 02:30:18 +02:00
staphen
3e5e5b2696
Synchronize SFileCloseFile() access
2021-05-08 04:01:07 +02:00
Anders Jenbo
4a7ba94702
🎨 Run clang-format
2021-05-07 23:26:39 +02:00
Gleb Mazovetskiy
0f95c3cbac
🧹 Fix a TSAN warning in DuplicateSound
...
This is likely a false positive from TSAN but good to fix nevertheless
Fixes #1849
2021-05-05 03:38:14 +02:00
Gleb Mazovetskiy
987ab2533b
🐞 Synchronize SFileReadFile access
...
StormLib read function is not thread-safe: https://github.com/ladislav-zezula/StormLib/issues/175
2021-05-03 02:35:22 +02:00
thebigMuh
24f32a1d53
Fix sound volume/panning attenuation ( #1789 )
...
* Fixing volume adjustment and scaling
2021-05-03 02:11:22 +02:00
Gleb Mazovetskiy
9980b77d23
🐞 ClearDuplicateSounds: Also lock the mutex
2021-05-02 15:04:05 +01:00
Gleb Mazovetskiy
559229dea1
🐞 Duplicate sounds: Fix data race
...
This fixes a data race by deleting the sound exactly when it finishes
playing.
Previously, a data race could happen in
`CleanupFinishedDuplicateSounds`, where the sound would be destroyed
while Aulib was reading from its buffer.
2021-05-02 14:15:35 +01:00
Gleb Mazovetskiy
0bfc147b78
🧹 Remove DiabloAllocPtr and friends ( #1824 )
2021-05-02 07:06:18 +02:00
Gleb Mazovetskiy
5820948761
♻️ Make SFileRw own the Storm file handle
...
All of our use-cases for `SDL_RWops` Storm file require closing the file
when closing the `SDL_RWops` -- doing this automatically simplifies the
code.
2021-05-02 02:34:16 +02:00
Gleb Mazovetskiy
7bdfb0655c
🐞 Support multiple playback of the same sound
2021-05-02 00:36:36 +02:00
Vladimir Olteanu
7aad72f96d
Use automatic memory management for sound stuff ( #1771 )
2021-04-30 09:02:07 +02:00
Gleb Mazovetskiy
0dd9aeea69
♻️ Cleanup DISABLE_STREAMING_MUSIC handling
...
Extracts `LoadMusic` and `CleanupMusic` functions.
2021-04-28 12:51:24 +02:00
Gleb Mazovetskiy
4b7409a8bf
🎶 Loop the music
...
Follow-up to #1651
2021-04-27 20:06:18 +02:00
Gleb Mazovetskiy
acee2ef14c
🎉 Switch from SDL_mixer to SDL_audiolib
...
SDL_mixer can only stream a single music track
SDL_audiolib has unlimited streams.
With this change, we finally have streaming sounds (respecting
sfx_STREAM).
Audio options can now also be set via diablo.ini, which should help us
better diagnose the static noise issues.
2021-04-27 00:54:50 +01:00
Jmgr
1b7e0d2cb3
Migrate existing log entries
2021-04-25 02:39:42 +02:00
Anders Jenbo
a32ac83090
🎨 cleanup trivial trype comparisons
2021-04-23 02:48:25 +02:00
Anders Jenbo
bb4e1960e7
🎨 modernize-use-nullptr
2021-04-19 16:02:05 +02:00
Anders Jenbo
8c821e98d3
🚚 Restructure files
2021-04-16 03:57:22 +02:00
Anders Jenbo
997c1dba55
🚚 Split up all.h in to proper header relations
2021-04-16 01:04:54 +02:00
Anders Jenbo
6e1a106a38
🚚 Move header we implement into the project
2021-04-16 01:04:54 +02:00
Anders Jenbo
67a7ff98c5
🚨 Clean up compiler warnings
2021-04-16 01:04:54 +02:00
Anders Jenbo
52401c9677
💚 Correct include headers
2021-04-10 14:31:05 +02:00
Anders Jenbo
dc84643fe6
🚚 Move dx.cpp and sound.cpp back in to Source now that the name space is clean
2021-04-10 14:30:22 +02:00
Anders Jenbo
5ff14b59da
Remove unused source
2019-09-13 03:56:32 +02:00
Anders Jenbo
98ab9b9600
Merge branch 'master' of github.com:diasurgical/devilution
2019-08-18 08:07:33 +02:00
Anders Jenbo
68d51e7d27
Implementing Spawned Shareware version
2019-08-12 16:04:20 +02:00
Anders Jenbo
2fcf8dab70
Merge branch 'master' of github.com:diasurgical/devilution
2019-07-21 19:39:17 +02:00
Anders Jenbo
6fba17eec5
Correct GLOBAL types based on PSX SYM 3
2019-07-21 04:10:31 +02:00
Anders Jenbo
e6f4e21631
Merge branch 'master' of github.com:diasurgical/devilution
2019-06-16 19:18:19 +02:00
Sergey Semushin
7e39fe457f
Fix diff in snd_play_snd.
2019-06-15 11:20:25 +02:00
Anders Jenbo
23e7737c75
Merge branch 'master' of github.com:diasurgical/devilution
...
Fixes #92
2019-05-05 00:27:08 +02:00
Anders Jenbo
e5f4fdcec9
Clean up sound.cpp
2019-05-02 00:16:46 +01:00
Xadhoom
6856fb74e2
Merge upstream beanch 'devilution/master'
2019-04-25 20:44:01 +00:00
Anders Jenbo
65b9fb87a8
Merge branch 'TownDead'
2019-04-24 14:08:25 +02:00
galaxyhaxz
540892ff9d
Preliminary support for fixed header files
2019-04-21 17:20:38 +02:00
galaxyhaxz
4e01e03711
Cleanup default calling conventions
2019-04-09 12:04:00 +02:00