1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 09:28:13 +00:00

Kernel/Audio: Propagate errors when creating AudioChannels

While doing this, we can also just return a normal RefPtr instead of a
LockRefPtr, because we create these channels when initializing an audio
controller, and never change the pointer in AudioController instances
after their initialization, hence no locking is necessary.
This commit is contained in:
Liav A 2023-04-11 13:11:02 +03:00 committed by Linus Groh
parent 4921561687
commit dd7633c5f4
8 changed files with 16 additions and 18 deletions

View file

@ -20,7 +20,7 @@ class AudioChannel final
friend class DeviceManagement;
public:
static NonnullLockRefPtr<AudioChannel> must_create(AudioController const&, size_t channel_index);
static ErrorOr<NonnullRefPtr<AudioChannel>> create(AudioController const&, size_t channel_index);
virtual ~AudioChannel() override = default;
// ^CharacterDevice