1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 05:47:35 +00:00

AudioServer: Use first audio channel in the /dev/audio directory

For now, just use the first audio channel in the /dev/audio directory.
In the future we can add support for watching and loading other channels
so we can route audio to multiple sound cards on the system.
This commit is contained in:
Liav A 2022-02-11 21:50:18 +02:00 committed by Andreas Kling
parent a1f3a48ed5
commit bf8c93fe0a

View file

@ -23,7 +23,8 @@ namespace AudioServer {
u8 Mixer::m_zero_filled_buffer[4096]; u8 Mixer::m_zero_filled_buffer[4096];
Mixer::Mixer(NonnullRefPtr<Core::ConfigFile> config) Mixer::Mixer(NonnullRefPtr<Core::ConfigFile> config)
: m_device(Core::File::construct("/dev/audio", this)) // FIXME: Allow AudioServer to use other audio channels as well
: m_device(Core::File::construct("/dev/audio/0", this))
, m_sound_thread(Threading::Thread::construct( , m_sound_thread(Threading::Thread::construct(
[this] { [this] {
mix(); mix();