Gleb Mazovetskiy
0f95c3cbac
🧹 Fix a TSAN warning in DuplicateSound
...
This is likely a false positive from TSAN but good to fix nevertheless
Fixes #1849
5 years ago
Gleb Mazovetskiy
987ab2533b
🐞 Synchronize SFileReadFile access
...
StormLib read function is not thread-safe: https://github.com/ladislav-zezula/StormLib/issues/175
5 years ago
thebigMuh
24f32a1d53
Fix sound volume/panning attenuation ( #1789 )
...
* Fixing volume adjustment and scaling
5 years ago
Gleb Mazovetskiy
9980b77d23
🐞 ClearDuplicateSounds: Also lock the mutex
5 years ago
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.
5 years ago
Gleb Mazovetskiy
0bfc147b78
🧹 Remove `DiabloAllocPtr` and friends ( #1824 )
5 years ago
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.
5 years ago
Gleb Mazovetskiy
7bdfb0655c
🐞 Support multiple playback of the same sound
5 years ago
Vladimir Olteanu
7aad72f96d
Use automatic memory management for sound stuff ( #1771 )
5 years ago
Gleb Mazovetskiy
0dd9aeea69
♻️ Cleanup DISABLE_STREAMING_MUSIC handling
...
Extracts `LoadMusic` and `CleanupMusic` functions.
5 years ago
Gleb Mazovetskiy
4b7409a8bf
🎶 Loop the music
...
Follow-up to #1651
5 years ago
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.
5 years ago
Jmgr
1b7e0d2cb3
Migrate existing log entries
5 years ago
Anders Jenbo
a32ac83090
🎨 cleanup trivial trype comparisons
5 years ago
Anders Jenbo
bb4e1960e7
🎨 modernize-use-nullptr
5 years ago
Anders Jenbo
8c821e98d3
🚚 Restructure files
5 years ago
Anders Jenbo
997c1dba55
🚚 Split up all.h in to proper header relations
5 years ago
Anders Jenbo
6e1a106a38
🚚 Move header we implement into the project
5 years ago
Anders Jenbo
67a7ff98c5
🚨 Clean up compiler warnings
5 years ago
Anders Jenbo
52401c9677
💚 Correct include headers
5 years ago
Anders Jenbo
dc84643fe6
🚚 Move dx.cpp and sound.cpp back in to Source now that the name space is clean
5 years ago
Anders Jenbo
61244c4d93
♻️ Rearange and apply more enums
5 years ago
Anders Jenbo
93d42b62b8
♻️ Change BOOL to bool
5 years ago
Anders Jenbo
4ee84aea1a
♻️ Change BOOLEAN to bool
...
fixup BOOLEAN
5 years ago
Anders Jenbo
433edc63ea
♻️ Consistently use pragma once to guard the headers
5 years ago
Anders Jenbo
bfb3c11c2b
🎨 Change namespace to devilution
5 years ago
Juliano Leal Goncalves
800dbce066
♻️ Move options-related structs to new 'options.h' file
5 years ago
Anders Jenbo
fbd86cd3c5
🎨 Mark noreturn functions as such
5 years ago
Gleb Mazovetskiy
88a68f503a
Disable streaming music and sound for 3DS / Switch ( #1264 )
...
Works around https://github.com/devkitPro/SDL/issues/72 at the cost of
~50 MiB extra RAM usage.
5 years ago
Gleb Mazovetskiy
7ead76e8d2
Remove SFileDdaSetVolume
...
It is only used in one place and does not actually control the volume of any specific file.
5 years ago
Gleb Mazovetskiy
0c2284a091
Respect sfx_STREAM in PlaySFX
...
Changes audio playback of sounds with the `sfx_STREAM` flag, such as towner lines, to stream.
5 years ago
Gleb Mazovetskiy
997650aa5d
Stream music instead of loading it all at once
...
RAM usage (my beefy desktop):
* Town: 176 MiB -> 121 MiB
* Cathedral: 191 MiB -> 138 MiB
Performance: 1170 FPS -> 1150 FPS
5 years ago
Juliano Leal Goncalves
103cde53ff
♻️ Make options struct hierarchical
5 years ago
Anders Jenbo
39999791b3
Revamp ini options and sync in multiplayer
...
[NetMsg]
F12=Now you DIE!
F11=Here's something for you.
F10=Follow me.
F9=I need help! Come Here!
[Game]
Speed=50
Fast Walk=1
Grab Input=0
Theo Quest=0
Cow Quest=0
[Audio]
Sound Volume=0
Music Volume=0
Walking Sound=1
[Graphics]
Fullscreen=1
Fit to Screen=1
Scaling Quality=2
Integer Scaling=0
Vertical Sync=1
Blended Transparency=1
Gamma Correction=100
Color Cycling=1
[Diablo]
Intro=0
[Hellfire]
Intro=0
SItem=
[Phone Book]
Entry1=127.0.0.1
[Network]
Bind Address=0.0.0.0
5 years ago
Anders Jenbo
36a196389b
Fix remaning basic compiler errors and warnings
5 years ago
Anders Jenbo
88a715cdcc
Clean up narator sound logic
...
Also this provides a helper function for calculating the length of a
sound
5 years ago
Anders Jenbo
374e8177ef
Remove wave.cpp
5 years ago
Anders Jenbo
9b1568cc08
Startup issues with shareware version
5 years ago
Anders Jenbo
c802cbdc4d
Merge more Hellfire code paths
5 years ago
Anders Jenbo
16c00f3119
Always save sound and video settings to the same section of the ini
5 years ago
Anders Jenbo
e073422ce7
Unify executable for Spawn and Retail
...
The game will now autodetect if it should run in shareware mode or full
retail based on the found mpq file. Additionally it can beforced in the
shareware mode with --spawn even if the retail data is found.
This simplifies a lot of the spagetty code and lets us better refactor,
also worth noteing is that we won't have to setup a secound set of build
tests.
5 years ago
Anders Jenbo
08aa6a860a
Move generic helpers out of miniwin
6 years ago
Anders Jenbo
6e9987cc93
Rename dsound and it nolonger reflects DirectSound
6 years ago
Anders Jenbo
171323b987
Make sure that sgbSaveSoundOn is initialized
...
Fixes #480
6 years ago
Anders Jenbo
16d3fa69c6
Fix checking if sound is playing
...
Fixes #392
6 years ago
Anders Jenbo
0e578ffb11
Enable assertions
6 years ago
Anders Jenbo
810b12a37d
Drop unused code
7 years ago
Anders Jenbo
a8e4db538f
Display SDL error messages in UI dialog
...
This will also end the application in most cases
7 years ago
Anders Jenbo
ba9288c6cf
Unify error dialogs, for looks and portability
...
- Use UiOkDialog() to display all error messages
- Add SDL simple message, and console fallbacks to UiOkDialog()
- Boot graphics early on to facilitate most error messages with build in
gui
- Some more miniwin clean ups
7 years ago
Anders Jenbo
97e09e3e25
Fix music in shareware
7 years ago