mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 03:27:45 +00:00
AudioServer: Turn ASMixer into a CObject
It was wrongly inheriting from RefCounted<AudioServer> without using reference counting. Let's just make it a CObject instead.
This commit is contained in:
parent
8aa3b74f80
commit
d5352b87b7
2 changed files with 8 additions and 2 deletions
|
@ -5,7 +5,7 @@
|
||||||
#include <limits>
|
#include <limits>
|
||||||
|
|
||||||
ASMixer::ASMixer()
|
ASMixer::ASMixer()
|
||||||
: m_device("/dev/audio")
|
: m_device("/dev/audio", this)
|
||||||
{
|
{
|
||||||
if (!m_device.open(CIODevice::WriteOnly)) {
|
if (!m_device.open(CIODevice::WriteOnly)) {
|
||||||
dbgprintf("Can't open audio device: %s\n", m_device.error_string());
|
dbgprintf("Can't open audio device: %s\n", m_device.error_string());
|
||||||
|
@ -20,6 +20,10 @@ ASMixer::ASMixer()
|
||||||
this);
|
this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ASMixer::~ASMixer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
NonnullRefPtr<ASBufferQueue> ASMixer::create_queue(ASClientConnection& client)
|
NonnullRefPtr<ASBufferQueue> ASMixer::create_queue(ASClientConnection& client)
|
||||||
{
|
{
|
||||||
LOCKER(m_lock);
|
LOCKER(m_lock);
|
||||||
|
|
|
@ -48,9 +48,11 @@ private:
|
||||||
WeakPtr<ASClientConnection> m_client;
|
WeakPtr<ASClientConnection> m_client;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ASMixer : public RefCounted<ASMixer> {
|
class ASMixer : public CObject {
|
||||||
|
C_OBJECT(ASMixer)
|
||||||
public:
|
public:
|
||||||
ASMixer();
|
ASMixer();
|
||||||
|
virtual ~ASMixer() override;
|
||||||
|
|
||||||
NonnullRefPtr<ASBufferQueue> create_queue(ASClientConnection&);
|
NonnullRefPtr<ASBufferQueue> create_queue(ASClientConnection&);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue