Commit Graph

13 Commits

Author SHA1 Message Date
arch1t3cht 819d90e9b0 Stereo playback on Linux audio players
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.
2022-08-18 22:48:40 +02:00
Ristellise fd28458ed8 Implement wangqr Audio Changes:
- 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.
 - 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.
2022-08-10 21:09:41 +08:00
Thomas Goyne 585e9489d9 Move some of the audio provider machinery to libaegisub
And add tests.
2014-07-10 11:44:56 -07:00
Thomas Goyne 8d26c66d0f Remove a bunch of unused functionalty from agi::Exception 2014-05-30 11:53:14 -07:00
Thomas Goyne d004fc1856 Improve ALSA playback position reporting
Use std::chrono since it's a nicer API. Use a separate lock for playback
position so that the GUI thread isn't blocked for hundreds of ms while
snd_pcm_drain is waiting, and update the playback position after
decoding audio rather than before to avoid it being significantly wrong
when not using a cache.
2014-05-23 13:03:10 -07:00
Thomas Goyne e36ecbde49 Reuse a decoding buffer for ALSA rather than constantly allocating new ones 2014-05-23 13:03:10 -07:00
Thomas Goyne 1bf6197869 Use std::thread rather than pthreads for AlsaPlayer 2014-05-23 13:03:10 -07:00
Thomas Goyne c2b8892b33 Use unique_ptr in AlsaPlayer 2014-05-23 13:03:10 -07:00
Thomas Goyne 6fc4c8da14 Move make_unique to its own header file
Rebuilding the entire project after touching util.h gets old fast.
2014-04-23 15:29:23 -07:00
Thomas Goyne 1d5292fdee Kill config.h and just force-include acconf.h in non-pch builds 2014-04-16 08:11:37 -07:00
Thomas Goyne 39626db787 Eliminate all uses of FrameMain via the global app object 2014-03-25 17:06:48 -07:00
Thomas Goyne e71270f0f0 Refactor the rest of the factories 2014-03-24 12:40:03 -07:00
Thomas Goyne 33a4a056a4 Move everything up a level since the root dir no longer has stuff 2014-03-11 12:14:57 -07:00
Renamed from aegisub/src/audio_player_alsa.cpp (Browse further)