Skip to content

Commit

Permalink
AudioServer: Use first audio channel in the /dev/audio directory
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
supercomputer7 authored and awesomekling committed Feb 14, 2022
1 parent a1f3a48 commit bf8c93f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Userland/Services/AudioServer/Mixer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ namespace AudioServer {
u8 Mixer::m_zero_filled_buffer[4096];

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(
[this] {
mix();
Expand Down

0 comments on commit bf8c93f

Please sign in to comment.