mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:37:43 +00:00
LibCore: Convert CFile to ObjectPtr
This commit is contained in:
parent
31b38ed88f
commit
8d550c174e
30 changed files with 135 additions and 134 deletions
|
@ -4,14 +4,14 @@
|
|||
#include <limits>
|
||||
|
||||
ASMixer::ASMixer()
|
||||
: m_device("/dev/audio", this)
|
||||
: m_device(CFile::construct("/dev/audio", this))
|
||||
, m_sound_thread([this] {
|
||||
mix();
|
||||
return 0;
|
||||
})
|
||||
{
|
||||
if (!m_device.open(CIODevice::WriteOnly)) {
|
||||
dbgprintf("Can't open audio device: %s\n", m_device.error_string());
|
||||
if (!m_device->open(CIODevice::WriteOnly)) {
|
||||
dbgprintf("Can't open audio device: %s\n", m_device->error_string());
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -88,7 +88,7 @@ void ASMixer::mix()
|
|||
|
||||
if (stream.offset() != 0) {
|
||||
buffer.trim(stream.offset());
|
||||
m_device.write(buffer);
|
||||
m_device->write(buffer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue