Commit graph

28 commits

Author SHA1 Message Date
obligaron
8a4d4b6375 Add OptionEntries for Audio 2021-12-14 04:10:16 +01:00
Gleb Mazovetskiy
7e1fea6f76 clang-format all files in {Source,test}/
Also includes a few manual tweaks to comments and newlines for better results.

Co-authored-by: Anders Jenbo <anders@jenbo.dk>
2021-11-24 23:44:12 +01:00
Gleb Mazovetskiy
fa90679416 game_assets.* -> assets.* 2021-11-17 11:49:57 +01:00
Gleb Mazovetskiy
3d308983a8 Migrate to libmpq
libmpq is a much simpler alternative to StormLib for reading MPQ archives.

We use our own fork of libmpq: https://github.com/diasurgical/libmpq

Impact:

* DevilutionX is now a lot more portable. Unlike StormLib, libmpq only
  needs platform-specific code for Windows.
* Locks around file access **removed** (instead we duplicate the file descriptor for streamed audio only).
* RAM usage is **300 KiB** lower than StormLib.
* Stripped release linux_x86_64 binary is **32 KiB** smaller.
* Amiga build now hangs instead of crashing.
2021-11-06 23:51:42 +00:00
Anders Jenbo
8df5912dc6 Always use SDL wrapper for file access 2021-10-20 21:52:59 +02:00
obligaron
837ddc0396 Fix a warning in soundsample.cpp 2021-07-17 14:35:21 +02:00
Anders Jenbo
9ebdb6db69 General clean up 2021-07-08 03:30:25 -07:00
ephphatha
3520dc4201 Update numeric literals to use appropriate suffix
Mainly things like .F for floats instead of doubles in float context.
2021-07-05 08:52:05 -07:00
Anders Jenbo
8e07ef8fe5 Clang-tidy: misc-unused-parameters 2021-06-27 17:34:32 +02:00
Anders Jenbo
fa54499aeb Clang-tidy: readability-uppercase-literal-suffix
Strip suffixes
2021-06-27 03:17:36 +02:00
Anders Jenbo
51d5c8bcab Clang-tidy: performance-unnecessary-value-param 2021-06-27 01:48:19 +02:00
Anders Jenbo
f167bd4dfb Clang-tidy: llvm-include-order 2021-06-27 01:45:49 +02:00
Anders Jenbo
ec8d7bebe2 Clang-tidy: modernize-use-auto 2021-06-27 01:18:31 +02: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
Anders Jenbo
4a7ba94702 🎨 Run clang-format 2021-05-07 23:26:39 +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
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
Anders Jenbo
f884ba5340 🔥 Remove more miniwin dependencies 2021-04-29 23:04:56 +02:00
Anders Jenbo
916a12ff3d 🐛 Fix missing sounds
When playing the same sound twice with in a short duration then the
sound it self, the secound request would go unfulfilled. The solution is
to simply rewind the stream pointer before requesting a playback.
2021-04-29 18:39:59 +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
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
7912e510f0 🎨 Clean up overuse of SDL types 2021-04-24 17:07:07 +02:00
thebigMuh
281533e82d This fixes exclusively the panning bug, where after a certain distance is exceeded, sound samples get played without panning. 2021-04-23 23:08:57 +02:00
Anders Jenbo
cc164985a3 🎨 Correct type checks in src sub-folder 2021-04-22 20:33:24 +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
Renamed from SourceX/soundsample.cpp (Browse further)