early-access version 2824

This commit is contained in:
pineappleEA
2022-07-10 14:59:48 +02:00
parent da2f33c5e0
commit 29fab4f91a
43 changed files with 543 additions and 403 deletions

View File

@@ -37,13 +37,16 @@ Result DeviceSession::Initialize(std::string_view name_, SampleFormat sample_for
sink = &system.AudioCore().GetOutputSink();
}
stream = sink->AcquireSinkStream(system, channel_count, name, type);
initialized = true;
return ResultSuccess;
}
void DeviceSession::Finalize() {
Stop();
sink->CloseStream(stream);
stream = nullptr;
if (initialized) {
Stop();
sink->CloseStream(stream);
stream = nullptr;
}
}
void DeviceSession::Start() {

View File

@@ -100,7 +100,7 @@ private:
/// System
Core::System& system;
/// Output sink this device will use
Sink::Sink* sink;
Sink::Sink* sink{};
/// The backend stream for this device session to send samples to
Sink::SinkStream* stream{};
/// Name of this device session
@@ -119,6 +119,8 @@ private:
u64 applet_resource_user_id{};
/// Total number of samples played by this device session
u64 played_sample_count{};
/// Is this session initialised?
bool initialized{};
};
} // namespace AudioCore