mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 17:27:35 +00:00
AudioServer: Fix visibility of Object-derivative constructors
Derivatives of Core::Object should be constructed through ClassName::construct(), to avoid handling ref-counted objects with refcount zero. Fixing the visibility means that misuses like this are more difficult. This commit is separate from the other Servives changes because it required additional adaption of the code. Note that the old code did precisely what these changes try to prevent: Create and handle a ref-counted object with a refcount of zero.
This commit is contained in:
parent
4e55d649d7
commit
25032a02aa
3 changed files with 6 additions and 4 deletions
|
@ -108,7 +108,6 @@ private:
|
|||
class Mixer : public Core::Object {
|
||||
C_OBJECT(Mixer)
|
||||
public:
|
||||
Mixer(NonnullRefPtr<Core::ConfigFile> config);
|
||||
virtual ~Mixer() override;
|
||||
|
||||
NonnullRefPtr<ClientAudioStream> create_queue(ClientConnection&);
|
||||
|
@ -124,6 +123,8 @@ public:
|
|||
u16 audiodevice_get_sample_rate() const;
|
||||
|
||||
private:
|
||||
Mixer(NonnullRefPtr<Core::ConfigFile> config);
|
||||
|
||||
void request_setting_sync();
|
||||
|
||||
Vector<NonnullRefPtr<ClientAudioStream>> m_pending_mixing;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue