Commit Graph
36489 Commits
Author SHA1 Message Date
sukibabyandteejusb c2ac89dcb6 Improve calc_mean function
A problem with using std::accumulate to calculate the mean is that small numbers get rounded down to zero when dealing with floating point numbers. This is solved by implementing the Kahan summation algorithm (https://en.wikipedia.org/wiki/Kahan_summation_algorithm).
2024-05-30 17:36:55 -07:00
sukibabyandteejusb 6f86f3eae5 Restore comment in Actor.cpp 2024-05-29 10:30:49 -07:00
sukibabyandteejusb e5d7b0db6c Update FFmpeg URL in .gitmodules 2024-05-29 10:30:30 -07:00
sukibabyandteejusb 03033857c2 Actor optimizations 2024-05-28 10:24:23 -07:00
sukibabyandteejusb 626e127589 Replace src/archutils/Win32/ddk/hidpi.h
From SDK 10.0.16299
2024-05-28 10:19:50 -07:00
sukibabyandteejusb b730a5a750 Remove AltiVec code
The content of src/archutils/Darwin/VectorHelper.cpp is very old, these are AltiVec and SSE2 instructions. This is only actually used in RageSoundMixBuffer.cpp. This level of micro-optimization is not needed since platforms this old are not supported by ITGm.
2024-05-28 09:34:59 -07:00
sukibabyandteejusb 558d84c37f Remove NTPAD check
NTpad is a driver for Windows 2000/XP which enables the use of a controller via the parallel port. This is not needed anymore and is just causing lag by constantly scanning the list of input devices on Windows.
2024-05-28 09:14:13 -07:00
Pete-Lawrenceandteejusb b2d69659eb Added missing lifts to stock dance Noteskins 2024-05-14 13:08:02 -07:00
sukibabyandteejusb b6f0da79a4 Change a lrint 2024-05-14 09:35:38 -07:00
sukibabyandteejusb 705a069400 Resolve the SM5 sync drift issue
Summary of changes

1) Fix issues in RageTimer and RageSoundPosMap
2) Calculate seconds from microseconds more accurately
3) Replace lrint(x) with static_cast<int>(x+0.5) for better performance
4) Replace C style casting with C++ style casting
5) Make important values 64-bit wide
6) Update RageUtil.cpp (timer conversion RStrings had some math which needed to be fixed after fixing RageTimer's math)
7) Ensure floating point math is done as floating point
8) Improve code commentary all around
9) Improve clarity and efficiency of RageSoundPosMap "return closest position" error logging
2024-05-12 08:05:41 -07:00
phantom10111andteejusb b365dcd65d PulseAudio: Hold mainloop lock during GetPosition() call
Mainloop lock needs to be held to access PulseAudio object from outside the
event loop thread, in particular in GetPosition() calls. Otherwise we might hit
a race condition and have the call fail. There's also a possibility that the
call might randomly fail if it's called before first timing data is received
for the stream, so handle that case as well.

Also fix the stream write callback to call Mix() with correct parameters, as
well as do the work in a loop in case pa_stream_begin_write() returns smaller
memory buffer than was requested.
2024-05-11 10:26:50 -07:00
phantom10111andteejusb bbf556450d X11: Don't call any X11 functions on fatal error
If X11 functions are called after a fatal error then it just triggers the fatal
error handler again eventually leading to stack overflow.
2024-05-11 09:46:26 -07:00
sukibabyandteejusb 3f8a7f5fd3 Run as "High Priority" on Windows
Enforcing HIGH_PRIORITY_CLASS is best for Win10+ where Windows Update can interrupt the game and it also prevents streaming apps (OBS/Discord) from causing stutter by taking rendering priority away from ITGMania.

Update ArchHooks_Win32.cpp
2024-05-10 00:33:36 -07:00
sukibabyandteejusb 3d63d80163 Always use CLOCK_MONOTONIC if it's available on Unix 2024-05-08 10:37:17 -07:00
sukibabyandteejusb eb8b428d0f Use range-based for loops in ScreenManager.cpp
Modernizing some of the old code - improve reliability by replacing traditional iterator loops where they are not needed.

Update ScreenManager.cpp
2024-05-08 01:55:51 -07:00
sukibabyandteejusb f7a7252dbb Replace timeGetTime() with QueryPerformanceCounter()
Update ArchHooks_Win32Static.cpp

This code provided a 7x accuracy improvement over timeGetTime(). (0.2ms vs 1.4ms std dev*3)

Rename variables to fit with existing naming mechanism
2024-05-07 17:57:47 -07:00
sukibabyandteejusb 8d24f61214 Don't warn user if frame size is not a multiple of 2
Disable this common nag warning + log file warning combination.
2024-05-07 10:20:12 -07:00
sukibabyandteejusb a5bbcebd0c Update BPMDisplay.cpp
Update BPMDisplay.cpp

Replace lrint with static_cast<int>+0.5

Proposed lrint change for the same reason as #235.
2024-05-04 10:52:43 -07:00
sukibabyandteejusb 2e2d49393b Replace lrint(x) with static_cast(x+0.5)
Update 9 files

Update RageSoundReader_Extend.cpp
Update RageSoundReader_Preload.cpp
Update RageSoundUtil.cpp
Update RageSoundReader_ThreadedBuffer.cpp
Update RageSoundReader_SpeedChange.cpp
Update RageSoundReader_Resample_Good.cpp
Update RageSoundReader_Merge.cpp
Update RageSoundReader_Chain.cpp
Update RageSoundMixBuffer.cpp
2024-05-03 23:17:59 -07:00
teejusb bd075c42a1 Also add --recursive to the Build/ readme 2024-04-30 17:17:16 -07:00
teejusb b040c5350c CI needs to run --recursive for the updated MbedTLS 2024-04-30 17:11:02 -07:00
teejusb a9fbfe4df0 Update IXWebSocket to support MbedTLS Crypto changes 2024-04-30 17:07:21 -07:00
teejusb 1920217cfb Reapply "Update mbedtls from 3.21 -> 3.6.0 LTS"
This reverts commit ff3ce9544a.
2024-04-30 16:50:25 -07:00
teejusb 0ebaffa6f1 Use the svg for the icon on linux + copy SL Modules as part of the setup script 2024-04-25 13:00:05 -07:00
Arthur Eubanksandteejusb adace28e57 Make zlib workaround for #107 apply everywhere
I missed zlib in #150.
2024-04-20 19:38:19 -07:00
Gareth Francisandteejusb 99e3d10775 Reduce rate of X11 screensave interrupt to once/minute 2024-04-19 00:29:35 -07:00
Arthur Eubanksandteejusb bdafbd4660 Fix some clang warnings
-Wunqualified-std-cast-call and -Wsign-compare.
2024-04-17 00:20:03 -07:00
phantom10111andteejusb 481161574e PulseAudio: Report actual audio playback position
PulseAudio driver used to report position of last frame written to audio stream
instead of actual playback position. This kind of worked, since on average the
write position doesn't diverge too much from actual elaped time, but it can
result in note stuttering and in general isn't very accurate. Change the
implementation to use actual playback position from PulseAudio stream.

Remove some compatibity code with old PulseAudio, since version 0.9.10 was
released in 2008.

Also, as an optimization to avoid unnecessary memory copying, use
pa_stream_begin_write() to mix audio directly into PulseAudio memory.
2024-04-12 22:40:41 -07:00
phantom10111andteejusb cacaded0cd Windows: Set console output codepage to UTF-8 2024-04-12 22:40:09 -07:00
phantom10111andteejusb 3df79a3f11 Windows: Remove old mapconv and verinc project files
mapconv is being built by CMake so no need to keep its project files in the
repo. verinc isn't used anymore so it can be removed completely.
2024-04-12 22:40:09 -07:00
phantom10111andteejusb 58a45d91f4 Windows: Compile with /utf-8 flag
Add /utf-8 flag to compilation on MSVC. This flag makes sure that source files
and static strings included in the application are UTF-8 strings.
2024-04-12 22:40:09 -07:00
phantom10111andteejusb 9a55cb99c1 Windows: Add manifest with UTF-8 code page specification
On Windows 10 versions starting with 1903, this manifest will allow Win32 -A
family of functions to accept UTF-8 strings as arguments.
2024-04-12 22:40:09 -07:00
phantom10111andteejusb 7dd50cf995 Windows: Generate version number in resource file
Windows executable had an old version number hardcoded in the resource file.
Automatically generate a file with correct version set.
2024-04-12 22:40:09 -07:00
phantom10111andteejusb 48e797bf35 Move generated directory to build directory
StepMania generates some files during build but it's a bit unusual to generate
them in source directory instead of build directory. Move them to build
directory and remove src/generated from .gitignore.
2024-04-12 22:40:09 -07:00
teejusb ff3ce9544a Revert "Update mbedtls from 3.21 -> 3.6.0 LTS"
This reverts commit 6123c2bad4.
2024-04-12 10:36:51 -07:00
teejusb f5e938c32b Revert "Also update the nested submodules with --recursive"
This reverts commit 5bea3b97f2.
2024-04-12 10:36:51 -07:00
Gareth Francisandteejusb 85bac5506e Prevent sound fade in/out from hitting assertion in fapproach 2024-04-11 10:59:03 -07:00
teejusb 5bea3b97f2 Also update the nested submodules with --recursive 2024-04-10 20:22:31 -07:00
teejusb 6123c2bad4 Update mbedtls from 3.21 -> 3.6.0 LTS 2024-04-10 20:22:31 -07:00
Gareth Francisandteejusb befae57e73 InputHandler_Linux_Joystick cleanup 2024-04-10 20:17:11 -07:00
Gareth Francisandteejusb ef86cbbda3 Remove limit of 4 joysticks in InputHandler_Linux_Joystick 2024-04-10 20:17:11 -07:00
Gareth Francisandteejusb 7009a16dea RageUtil::UnicodeUpperLower: Prevent negative characters from segfaulting under GCC 2024-04-10 14:09:10 -07:00
Scott Brennerandteejusb 65f33b5699 Update Build/README.md 2024-04-09 23:43:17 -07:00
Scott Brennerandteejusb f1062ae5ed Skip build suite for changes to Markdown files 2024-04-09 23:42:45 -07:00
Scott Brennerandteejusb eaa7d03a03 Modify runner for macOS (Intel) build 2024-04-09 21:44:55 -07:00
phantom10111andteejusb 208494b735 Fix coloring of BitmapText with overlapping attributes
When AddAttribute() is called multiple times with overlapping ranges, old
attributes need to be removed and/or fixed. Otherwise the old colors might
show up when the text is rendered.
2024-04-09 00:34:47 -07:00
phantom10111andteejusb 17c4e7a2ff Reset input redirection on screen change
It's possible for LUA to redirect input and not bring it back when screen is
ending (and there are existing bugs like this in Simply Love). Considering that
each screen is a separate entity, it seems like this shouldn't be possible and
each screen should handle redirection separately. Split redirection state per
each screen in the stack and clear it once screen is ending.
2024-04-04 11:16:51 -05:00
nabulatorandteejusb 04c234831b bump ffmpeg to n5.1.4 to compile on Arch Linux as per @Drayux comment 2024-04-04 09:21:16 -05:00
Curtis Ruedenandteejusb ce3cb266a1 Guard against division by zero crash
Closes #197.
2024-04-03 12:26:27 -05:00
teejusb 3138447138 It's fine to play tick/metronome for failed players. 2024-03-22 15:18:53 -07:00