After the audio provider rework, adjust the audio players to not
use the int16 mono downmixed audio unless necessary. Furthermore,
the pulseaudio-based player now controls the volume directly through
pulseaudio instead of by modifying the buffer. This also reduces latency
when changing the volume.
The entire set of GetAudio functions is quite messy now. After wangqr's
audio rework, it was split into GetAudio and GetInt16MonoAudio
functions, but now volume scaling is also necessary. Really, this should
go back to a type constructor based system with audio players being
allowed to choose what properties out of mono / 16 bytes / int samples /
volume they need.
These were giving false negatives on samba shares, which broke the font
collector. Windows also recommends to not use access checks in these
cases, and instead just see if the operations succeeds or not.
- To allow for XAudio2 to work properly, we need to rework how does provider work since they only are used to be able to take in mono audio.
- Other providers have been dumbed down to accept single channel audio since originally aegisub only accepted 1 channel audio.
- meson.build has been modified to accommodate for xaudio, as we currently don't accept redistributable forms of xaudio, we need to work around the WinNT version.
- There has been 1 more fix to res.rc to allow for compiling on non tagged releases.
The previous logic wouldn't compile on linux using clang.
With the meson build requiring c++14, there's no need for platform
specific code. Really, the entire agi::util::sleep_for function could be
removed entirely, but I'll keep the patch minimal for now.
Meson port instead of using CMake as I ran into issues with the
src directory (where uchardet.h is located) not being appended
to the include path, and on Windows I ran into a Meson issue
where a -D macro definition was being interpreted as a filename.
In the end a Meson port seemed simpler than working out the CMake
issues, as the CMakeLists.txt files were straightforward and easy
to port.
Note that because of the directory structure of the uchardet source
I had to change the include directive from uchardet/uchardet.h
to just uchardet.h. This is actually more in line with the uchardet
pkg-config file, which appends /usr/include/uchardet to the include path.
uchardet will report that a file is "ascii" if the first page has no bytes
>127, so we need to actually look at the entire file in case the first higher
byte is later in the file.
$(subst .c,.o,...) replaces '.c' with '.o' everywhere in pathnames. For
example, renaming the "Aegisub" folder to "Aegisub.cool" will make the
build system generate "Aegisub.oool/.../.o" objects.
https://www.gnu.org/software/make/manual/make.html#Text-Functions