mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 19:37:35 +00:00
LibAudio+Userland: Use new audio queue in client-server communication
Previously, we were sending Buffers to the server whenever we had new audio data for it. This meant that for every audio enqueue action, we needed to create a new shared memory anonymous buffer, send that buffer's file descriptor over IPC (+recfd on the other side) and then map the buffer into the audio server's memory to be able to play it. This was fine for sending large chunks of audio data, like when playing existing audio files. However, in the future we want to move to real-time audio in some applications like Piano. This means that the size of buffers that are sent need to be very small, as just the size of a buffer itself is part of the audio latency. If we were to try real-time audio with the existing system, we would run into problems really quickly. Dealing with a continuous stream of new anonymous files like the current audio system is rather expensive, as we need Kernel help in multiple places. Additionally, every enqueue incurs an IPC call, which are not optimized for >1000 calls/second (which would be needed for real-time audio with buffer sizes of ~40 samples). So a fundamental change in how we handle audio sending in userspace is necessary. This commit moves the audio sending system onto a shared single producer circular queue (SSPCQ) (introduced with one of the previous commits). This queue is intended to live in shared memory and be accessed by multiple processes at the same time. It was specifically written to support the audio sending case, so e.g. it only supports a single producer (the audio client). Now, audio sending follows these general steps: - The audio client connects to the audio server. - The audio client creates a SSPCQ in shared memory. - The audio client sends the SSPCQ's file descriptor to the audio server with the set_buffer() IPC call. - The audio server receives the SSPCQ and maps it. - The audio client signals start of playback with start_playback(). - At the same time: - The audio client writes its audio data into the shared-memory queue. - The audio server reads audio data from the shared-memory queue(s). Both sides have additional before-queue/after-queue buffers, depending on the exact application. - Pausing playback is just an IPC call, nothing happens to the buffer except that the server stops reading from it until playback is resumed. - Muting has nothing to do with whether audio data is read or not. - When the connection closes, the queues are unmapped on both sides. This should already improve audio playback performance in a bunch of places. Implementation & commit notes: - Audio loaders don't create LegacyBuffers anymore. LegacyBuffer is kept for WavLoader, see previous commit message. - Most intra-process audio data passing is done with FixedArray<Sample> or Vector<Sample>. - Improvements to most audio-enqueuing applications. (If necessary I can try to extract some of the aplay improvements.) - New APIs on LibAudio/ClientConnection which allows non-realtime applications to enqueue audio in big chunks like before. - Removal of status APIs from the audio server connection for information that can be directly obtained from the shared queue. - Split the pause playback API into two APIs with more intuitive names. I know this is a large commit, and you can kinda tell from the commit message. It's basically impossible to break this up without hacks, so please forgive me. These are some of the best changes to the audio subsystem and I hope that that makes up for this :yaktangle: commit. :yakring:
This commit is contained in:
parent
cb0e95c928
commit
49b087f3cd
36 changed files with 485 additions and 278 deletions
|
@ -8,18 +8,20 @@
|
|||
#include "AudioPlayerLoop.h"
|
||||
|
||||
#include "TrackManager.h"
|
||||
#include <AK/FixedArray.h>
|
||||
#include <AK/NumericLimits.h>
|
||||
#include <LibAudio/ConnectionFromClient.h>
|
||||
#include <LibAudio/Resampler.h>
|
||||
#include <LibAudio/Sample.h>
|
||||
#include <LibCore/EventLoop.h>
|
||||
|
||||
// Converts Piano-internal data to an Audio::LegacyBuffer that AudioServer receives
|
||||
static NonnullRefPtr<Audio::LegacyBuffer> music_samples_to_buffer(Array<Sample, sample_count> samples)
|
||||
static FixedArray<Audio::Sample> music_samples_to_buffer(Vector<Music::Sample>& music_samples)
|
||||
{
|
||||
Vector<Audio::Sample, sample_count> frames;
|
||||
frames.ensure_capacity(sample_count);
|
||||
for (auto sample : samples) {
|
||||
Audio::Sample frame = { sample.left / (double)NumericLimits<i16>::max(), sample.right / (double)NumericLimits<i16>::max() };
|
||||
frames.unchecked_append(frame);
|
||||
}
|
||||
// FIXME: Handle OOM better.
|
||||
return MUST(Audio::LegacyBuffer::create_with_samples(frames));
|
||||
FixedArray<Audio::Sample> samples = MUST(FixedArray<Audio::Sample>::try_create(music_samples.size()));
|
||||
for (size_t i = 0; i < music_samples.size(); ++i)
|
||||
samples[i] = { static_cast<double>(music_samples[i].left) / AK::NumericLimits<i16>::max(), static_cast<double>(music_samples[i].right) / AK::NumericLimits<i16>::max() };
|
||||
|
||||
return samples;
|
||||
}
|
||||
|
||||
AudioPlayerLoop::AudioPlayerLoop(TrackManager& track_manager, bool& need_to_write_wav, Audio::WavWriter& wav_writer)
|
||||
|
@ -28,24 +30,31 @@ AudioPlayerLoop::AudioPlayerLoop(TrackManager& track_manager, bool& need_to_writ
|
|||
, m_wav_writer(wav_writer)
|
||||
{
|
||||
m_audio_client = Audio::ConnectionFromClient::try_create().release_value_but_fixme_should_propagate_errors();
|
||||
m_audio_client->on_finish_playing_buffer = [this](int buffer_id) {
|
||||
(void)buffer_id;
|
||||
enqueue_audio();
|
||||
};
|
||||
|
||||
auto target_sample_rate = m_audio_client->get_sample_rate();
|
||||
if (target_sample_rate == 0)
|
||||
target_sample_rate = Music::sample_rate;
|
||||
m_resampler = Audio::ResampleHelper<double>(Music::sample_rate, target_sample_rate);
|
||||
m_resampler = Audio::ResampleHelper<Sample>(Music::sample_rate, target_sample_rate);
|
||||
|
||||
// FIXME: I said I would never write such a hack again, but here we are.
|
||||
// This code should die as soon as possible anyways, so it doesn't matter.
|
||||
// Please don't use this as an example to write good audio code; it's just here as a temporary hack.
|
||||
Core::EventLoop::register_timer(*this, 10, true, Core::TimerShouldFireWhenNotVisible::Yes);
|
||||
}
|
||||
|
||||
void AudioPlayerLoop::timer_event(Core::TimerEvent&)
|
||||
{
|
||||
if (m_audio_client->remaining_samples() < buffer_size)
|
||||
enqueue_audio();
|
||||
}
|
||||
|
||||
void AudioPlayerLoop::enqueue_audio()
|
||||
{
|
||||
m_track_manager.fill_buffer(m_buffer);
|
||||
NonnullRefPtr<Audio::LegacyBuffer> audio_buffer = music_samples_to_buffer(m_buffer);
|
||||
// FIXME: Handle OOM better.
|
||||
audio_buffer = MUST(Audio::resample_buffer(m_resampler.value(), *audio_buffer));
|
||||
m_audio_client->async_enqueue(audio_buffer);
|
||||
auto audio_buffer = m_resampler->resample(m_buffer);
|
||||
auto real_buffer = music_samples_to_buffer(audio_buffer);
|
||||
(void)m_audio_client->async_enqueue(real_buffer);
|
||||
|
||||
// FIXME: This should be done somewhere else.
|
||||
if (m_need_to_write_wav) {
|
||||
|
@ -66,5 +75,8 @@ void AudioPlayerLoop::toggle_paused()
|
|||
{
|
||||
m_should_play_audio = !m_should_play_audio;
|
||||
|
||||
m_audio_client->set_paused(!m_should_play_audio);
|
||||
if (m_should_play_audio)
|
||||
m_audio_client->async_start_playback();
|
||||
else
|
||||
m_audio_client->async_pause_playback();
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include <LibAudio/Buffer.h>
|
||||
#include <LibAudio/ConnectionFromClient.h>
|
||||
#include <LibAudio/WavWriter.h>
|
||||
#include <LibCore/Event.h>
|
||||
#include <LibCore/Object.h>
|
||||
|
||||
class TrackManager;
|
||||
|
@ -28,9 +29,11 @@ public:
|
|||
private:
|
||||
AudioPlayerLoop(TrackManager& track_manager, bool& need_to_write_wav, Audio::WavWriter& wav_writer);
|
||||
|
||||
virtual void timer_event(Core::TimerEvent&) override;
|
||||
|
||||
TrackManager& m_track_manager;
|
||||
Array<Sample, sample_count> m_buffer;
|
||||
Optional<Audio::ResampleHelper<double>> m_resampler;
|
||||
Optional<Audio::ResampleHelper<Sample>> m_resampler;
|
||||
RefPtr<Audio::ConnectionFromClient> m_audio_client;
|
||||
|
||||
bool m_should_play_audio = true;
|
||||
|
|
|
@ -24,7 +24,7 @@ struct Sample {
|
|||
};
|
||||
|
||||
// HACK: needs to increase with device sample rate, but all of the sample_count stuff is static for now
|
||||
constexpr int sample_count = 1 << 12;
|
||||
constexpr int sample_count = 1 << 10;
|
||||
|
||||
constexpr int buffer_size = sample_count * sizeof(Sample);
|
||||
|
||||
|
|
|
@ -38,8 +38,6 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
bool need_to_write_wav = false;
|
||||
|
||||
auto audio_loop = AudioPlayerLoop::construct(track_manager, need_to_write_wav, wav_writer);
|
||||
audio_loop->enqueue_audio();
|
||||
audio_loop->enqueue_audio();
|
||||
|
||||
auto app_icon = GUI::Icon::default_icon("app-piano");
|
||||
auto window = GUI::Window::construct();
|
||||
|
|
|
@ -19,4 +19,4 @@ set(SOURCES
|
|||
)
|
||||
|
||||
serenity_app(SoundPlayer ICON app-sound-player)
|
||||
target_link_libraries(SoundPlayer LibAudio LibDSP LibGUI LibMain)
|
||||
target_link_libraries(SoundPlayer LibAudio LibDSP LibGUI LibMain LibThreading)
|
||||
|
|
|
@ -10,21 +10,12 @@
|
|||
PlaybackManager::PlaybackManager(NonnullRefPtr<Audio::ConnectionFromClient> connection)
|
||||
: m_connection(connection)
|
||||
{
|
||||
// FIXME: The buffer enqueuing should happen on a wholly independend second thread.
|
||||
m_timer = Core::Timer::construct(PlaybackManager::update_rate_ms, [&]() {
|
||||
if (!m_loader)
|
||||
return;
|
||||
// Make sure that we have some buffers queued up at all times: an audio dropout is the last thing we want.
|
||||
if (m_enqueued_buffers.size() < always_enqueued_buffer_count)
|
||||
next_buffer();
|
||||
});
|
||||
m_connection->on_finish_playing_buffer = [this](auto finished_buffer) {
|
||||
auto last_buffer_in_queue = m_enqueued_buffers.dequeue();
|
||||
// A fail here would mean that the server skipped one of our buffers, which is BAD.
|
||||
if (last_buffer_in_queue != finished_buffer)
|
||||
dbgln("Never heard back about buffer {}, what happened?", last_buffer_in_queue);
|
||||
|
||||
next_buffer();
|
||||
};
|
||||
});
|
||||
m_timer->stop();
|
||||
m_device_sample_rate = connection->get_sample_rate();
|
||||
}
|
||||
|
@ -36,9 +27,8 @@ void PlaybackManager::set_loader(NonnullRefPtr<Audio::Loader>&& loader)
|
|||
if (m_loader) {
|
||||
m_total_length = m_loader->total_samples() / static_cast<float>(m_loader->sample_rate());
|
||||
m_device_samples_per_buffer = PlaybackManager::buffer_size_ms / 1000.0f * m_device_sample_rate;
|
||||
u32 source_samples_per_buffer = PlaybackManager::buffer_size_ms / 1000.0f * m_loader->sample_rate();
|
||||
m_source_buffer_size_bytes = source_samples_per_buffer * m_loader->num_channels() * m_loader->bits_per_sample() / 8;
|
||||
m_resampler = Audio::ResampleHelper<double>(m_loader->sample_rate(), m_device_sample_rate);
|
||||
m_samples_to_load_per_buffer = PlaybackManager::buffer_size_ms / 1000.0f * m_loader->sample_rate();
|
||||
m_resampler = Audio::ResampleHelper<Audio::Sample>(m_loader->sample_rate(), m_device_sample_rate);
|
||||
m_timer->start();
|
||||
} else {
|
||||
m_timer->stop();
|
||||
|
@ -48,9 +38,8 @@ void PlaybackManager::set_loader(NonnullRefPtr<Audio::Loader>&& loader)
|
|||
void PlaybackManager::stop()
|
||||
{
|
||||
set_paused(true);
|
||||
m_connection->clear_buffer(true);
|
||||
m_connection->async_clear_buffer();
|
||||
m_last_seek = 0;
|
||||
m_current_buffer = nullptr;
|
||||
|
||||
if (m_loader)
|
||||
(void)m_loader->reset();
|
||||
|
@ -75,11 +64,10 @@ void PlaybackManager::seek(int const position)
|
|||
bool paused_state = m_paused;
|
||||
set_paused(true);
|
||||
|
||||
m_connection->clear_buffer(true);
|
||||
m_current_buffer = nullptr;
|
||||
|
||||
[[maybe_unused]] auto result = m_loader->seek(position);
|
||||
|
||||
m_connection->clear_client_buffer();
|
||||
m_connection->async_clear_buffer();
|
||||
if (!paused_state)
|
||||
set_paused(false);
|
||||
}
|
||||
|
@ -92,7 +80,10 @@ void PlaybackManager::pause()
|
|||
void PlaybackManager::set_paused(bool paused)
|
||||
{
|
||||
m_paused = paused;
|
||||
m_connection->set_paused(paused);
|
||||
if (m_paused)
|
||||
m_connection->async_pause_playback();
|
||||
else
|
||||
m_connection->async_start_playback();
|
||||
}
|
||||
|
||||
bool PlaybackManager::toggle_pause()
|
||||
|
@ -113,27 +104,26 @@ void PlaybackManager::next_buffer()
|
|||
if (m_paused)
|
||||
return;
|
||||
|
||||
u32 audio_server_remaining_samples = m_connection->get_remaining_samples();
|
||||
bool all_samples_loaded = (m_loader->loaded_samples() >= m_loader->total_samples());
|
||||
bool audio_server_done = (audio_server_remaining_samples == 0);
|
||||
while (m_connection->remaining_samples() < m_device_samples_per_buffer * always_enqueued_buffer_count) {
|
||||
bool all_samples_loaded = (m_loader->loaded_samples() >= m_loader->total_samples());
|
||||
bool audio_server_done = (m_connection->remaining_samples() == 0);
|
||||
|
||||
if (all_samples_loaded && audio_server_done) {
|
||||
stop();
|
||||
if (on_finished_playing)
|
||||
on_finished_playing();
|
||||
return;
|
||||
}
|
||||
if (all_samples_loaded && audio_server_done) {
|
||||
stop();
|
||||
if (on_finished_playing)
|
||||
on_finished_playing();
|
||||
return;
|
||||
}
|
||||
|
||||
if (audio_server_remaining_samples < m_device_samples_per_buffer * always_enqueued_buffer_count) {
|
||||
auto maybe_buffer = m_loader->get_more_samples(m_source_buffer_size_bytes);
|
||||
auto maybe_buffer = m_loader->get_more_samples(m_samples_to_load_per_buffer);
|
||||
if (!maybe_buffer.is_error()) {
|
||||
m_current_buffer = maybe_buffer.release_value();
|
||||
m_current_buffer.swap(maybe_buffer.value());
|
||||
VERIFY(m_resampler.has_value());
|
||||
m_resampler->reset();
|
||||
// FIXME: Handle OOM better.
|
||||
m_current_buffer = MUST(Audio::resample_buffer(m_resampler.value(), *m_current_buffer));
|
||||
m_connection->enqueue(*m_current_buffer);
|
||||
m_enqueued_buffers.enqueue(m_current_buffer->id());
|
||||
auto resampled = MUST(FixedArray<Audio::Sample>::try_create(m_resampler->resample(move(m_current_buffer)).span()));
|
||||
m_current_buffer.swap(resampled);
|
||||
MUST(m_connection->async_enqueue(m_current_buffer));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,11 +7,13 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/FixedArray.h>
|
||||
#include <AK/Queue.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <LibAudio/Buffer.h>
|
||||
#include <LibAudio/ConnectionFromClient.h>
|
||||
#include <LibAudio/Loader.h>
|
||||
#include <LibAudio/Sample.h>
|
||||
#include <LibCore/Timer.h>
|
||||
|
||||
class PlaybackManager final {
|
||||
|
@ -32,17 +34,16 @@ public:
|
|||
int last_seek() const { return m_last_seek; }
|
||||
bool is_paused() const { return m_paused; }
|
||||
float total_length() const { return m_total_length; }
|
||||
RefPtr<Audio::LegacyBuffer> current_buffer() const { return m_current_buffer; }
|
||||
FixedArray<Audio::Sample> const& current_buffer() const { return m_current_buffer; }
|
||||
|
||||
NonnullRefPtr<Audio::ConnectionFromClient> connection() const { return m_connection; }
|
||||
|
||||
Function<void()> on_update;
|
||||
Function<void(Audio::LegacyBuffer&)> on_load_sample_buffer;
|
||||
Function<void()> on_finished_playing;
|
||||
|
||||
private:
|
||||
// Number of buffers we want to always keep enqueued.
|
||||
static constexpr size_t always_enqueued_buffer_count = 2;
|
||||
static constexpr size_t always_enqueued_buffer_count = 5;
|
||||
|
||||
void next_buffer();
|
||||
void set_paused(bool);
|
||||
|
@ -53,12 +54,11 @@ private:
|
|||
float m_total_length { 0 };
|
||||
size_t m_device_sample_rate { 44100 };
|
||||
size_t m_device_samples_per_buffer { 0 };
|
||||
size_t m_source_buffer_size_bytes { 0 };
|
||||
size_t m_samples_to_load_per_buffer { 0 };
|
||||
RefPtr<Audio::Loader> m_loader { nullptr };
|
||||
NonnullRefPtr<Audio::ConnectionFromClient> m_connection;
|
||||
RefPtr<Audio::LegacyBuffer> m_current_buffer;
|
||||
Queue<i32, always_enqueued_buffer_count + 1> m_enqueued_buffers;
|
||||
Optional<Audio::ResampleHelper<double>> m_resampler;
|
||||
FixedArray<Audio::Sample> m_current_buffer;
|
||||
Optional<Audio::ResampleHelper<Audio::Sample>> m_resampler;
|
||||
RefPtr<Core::Timer> m_timer;
|
||||
|
||||
// Controls the GUI update rate. A smaller value makes the visualizations nicer.
|
||||
|
|
|
@ -12,7 +12,7 @@ Player::Player(Audio::ConnectionFromClient& audio_client_connection)
|
|||
, m_playback_manager(audio_client_connection)
|
||||
{
|
||||
m_playback_manager.on_update = [&]() {
|
||||
auto samples_played = m_audio_client_connection.get_played_samples();
|
||||
auto samples_played = m_playback_manager.loader()->loaded_samples();
|
||||
auto sample_rate = m_playback_manager.loader()->sample_rate();
|
||||
float source_to_dest_ratio = static_cast<float>(sample_rate) / m_playback_manager.device_sample_rate();
|
||||
samples_played *= source_to_dest_ratio;
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include "Playlist.h"
|
||||
#include "PlaylistWidget.h"
|
||||
#include <AK/RefPtr.h>
|
||||
#include <LibAudio/Sample.h>
|
||||
|
||||
class Player {
|
||||
public:
|
||||
|
@ -72,7 +73,7 @@ public:
|
|||
virtual void volume_changed(double) = 0;
|
||||
virtual void mute_changed(bool) = 0;
|
||||
virtual void total_samples_changed(int) = 0;
|
||||
virtual void sound_buffer_played(RefPtr<Audio::LegacyBuffer>, [[maybe_unused]] int sample_rate, [[maybe_unused]] int samples_played) = 0;
|
||||
virtual void sound_buffer_played(FixedArray<Audio::Sample> const&, [[maybe_unused]] int sample_rate, [[maybe_unused]] int samples_played) = 0;
|
||||
|
||||
protected:
|
||||
void done_initializing()
|
||||
|
|
|
@ -216,7 +216,7 @@ void SoundPlayerWidgetAdvancedView::total_samples_changed(int total_samples)
|
|||
m_playback_progress_slider->set_page_step(total_samples / 10);
|
||||
}
|
||||
|
||||
void SoundPlayerWidgetAdvancedView::sound_buffer_played(RefPtr<Audio::LegacyBuffer> buffer, int sample_rate, int samples_played)
|
||||
void SoundPlayerWidgetAdvancedView::sound_buffer_played(FixedArray<Audio::Sample> const& buffer, int sample_rate, int samples_played)
|
||||
{
|
||||
m_visualization->set_buffer(buffer);
|
||||
m_visualization->set_samplerate(sample_rate);
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include "PlaybackManager.h"
|
||||
#include "Player.h"
|
||||
#include "VisualizationWidget.h"
|
||||
#include <AK/FixedArray.h>
|
||||
#include <AK/NonnullRefPtr.h>
|
||||
#include <LibAudio/ConnectionFromClient.h>
|
||||
#include <LibGUI/Splitter.h>
|
||||
|
@ -46,7 +47,7 @@ public:
|
|||
virtual void volume_changed(double) override;
|
||||
virtual void mute_changed(bool) override;
|
||||
virtual void total_samples_changed(int) override;
|
||||
virtual void sound_buffer_played(RefPtr<Audio::LegacyBuffer>, int sample_rate, int samples_played) override;
|
||||
virtual void sound_buffer_played(FixedArray<Audio::Sample> const&, int sample_rate, int samples_played) override;
|
||||
|
||||
protected:
|
||||
void keydown_event(GUI::KeyEvent&) override;
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/FixedArray.h>
|
||||
#include <AK/Forward.h>
|
||||
#include <AK/TypedTransfer.h>
|
||||
#include <LibAudio/Buffer.h>
|
||||
|
@ -13,24 +14,21 @@
|
|||
#include <LibGUI/Painter.h>
|
||||
|
||||
class VisualizationWidget : public GUI::Frame {
|
||||
C_OBJECT(VisualizationWidget)
|
||||
C_OBJECT_ABSTRACT(VisualizationWidget)
|
||||
|
||||
public:
|
||||
virtual void render(GUI::PaintEvent&, FixedArray<double> const& samples) = 0;
|
||||
|
||||
void set_buffer(RefPtr<Audio::LegacyBuffer> buffer)
|
||||
void set_buffer(FixedArray<Audio::Sample> const& buffer)
|
||||
{
|
||||
if (buffer.is_null())
|
||||
if (buffer.is_empty())
|
||||
return;
|
||||
if (buffer->id() == m_last_buffer_id)
|
||||
return;
|
||||
m_last_buffer_id = buffer->id();
|
||||
|
||||
if (m_sample_buffer.size() != static_cast<size_t>(buffer->sample_count()))
|
||||
m_sample_buffer.resize(buffer->sample_count());
|
||||
if (m_sample_buffer.size() != buffer.size())
|
||||
m_sample_buffer.resize(buffer.size());
|
||||
|
||||
for (size_t i = 0; i < static_cast<size_t>(buffer->sample_count()); i++)
|
||||
m_sample_buffer.data()[i] = (buffer->samples()[i].left + buffer->samples()[i].right) / 2.;
|
||||
for (size_t i = 0; i < buffer.size(); i++)
|
||||
m_sample_buffer.data()[i] = (buffer[i].left + buffer[i].right) / 2.;
|
||||
|
||||
m_frame_count = 0;
|
||||
}
|
||||
|
@ -80,7 +78,6 @@ public:
|
|||
|
||||
protected:
|
||||
int m_samplerate;
|
||||
int m_last_buffer_id;
|
||||
size_t m_frame_count;
|
||||
Vector<double> m_sample_buffer;
|
||||
FixedArray<double> m_render_buffer;
|
||||
|
@ -89,7 +86,6 @@ protected:
|
|||
|
||||
VisualizationWidget()
|
||||
: m_samplerate(-1)
|
||||
, m_last_buffer_id(-1)
|
||||
, m_frame_count(0)
|
||||
{
|
||||
start_timer(REFRESH_TIME_MILLISECONDS);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue