Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@@ -380,7 +380,7 @@ void pipewire_device::process_mic_data(wivrn::audio_data && sample)
|
||||
mic_buffer_size_bytes += size;
|
||||
}
|
||||
|
||||
std::shared_ptr<audio_device> create_pipewire_handle(
|
||||
std::unique_ptr<audio_device> create_pipewire_handle(
|
||||
const std::string & source_name,
|
||||
const std::string & source_description,
|
||||
const std::string & sink_name,
|
||||
@@ -390,7 +390,7 @@ std::shared_ptr<audio_device> create_pipewire_handle(
|
||||
{
|
||||
try
|
||||
{
|
||||
return std::make_shared<pipewire_device>(
|
||||
return std::make_unique<pipewire_device>(
|
||||
source_name, source_description, sink_name, sink_description, info, session);
|
||||
}
|
||||
catch (std::exception & e)
|
||||
@@ -399,4 +399,4 @@ std::shared_ptr<audio_device> create_pipewire_handle(
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
} // namespace wivrn
|
||||
} // namespace wivrn
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
namespace wivrn
|
||||
{
|
||||
|
||||
std::shared_ptr<audio_device> create_pipewire_handle(
|
||||
std::unique_ptr<audio_device> create_pipewire_handle(
|
||||
const std::string & source_name,
|
||||
const std::string & source_description,
|
||||
const std::string & sink_name,
|
||||
|
||||
@@ -445,7 +445,7 @@ struct pulse_device : public audio_device
|
||||
}
|
||||
};
|
||||
|
||||
std::shared_ptr<audio_device> create_pulse_handle(
|
||||
std::unique_ptr<audio_device> create_pulse_handle(
|
||||
const std::string & source_name,
|
||||
const std::string & source_description,
|
||||
const std::string & sink_name,
|
||||
@@ -455,7 +455,7 @@ std::shared_ptr<audio_device> create_pulse_handle(
|
||||
{
|
||||
try
|
||||
{
|
||||
return std::make_shared<pulse_device>(
|
||||
return std::make_unique<pulse_device>(
|
||||
source_name, source_description, sink_name, sink_description, info, session);
|
||||
}
|
||||
catch (std::exception & e)
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
namespace wivrn
|
||||
{
|
||||
|
||||
std::shared_ptr<audio_device> create_pulse_handle(
|
||||
std::unique_ptr<audio_device> create_pulse_handle(
|
||||
const std::string & source_name,
|
||||
const std::string & source_description,
|
||||
const std::string & sink_name,
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#include "audio_pipewire.h"
|
||||
#endif
|
||||
|
||||
std::shared_ptr<wivrn::audio_device> wivrn::audio_device::create(
|
||||
std::unique_ptr<wivrn::audio_device> wivrn::audio_device::create(
|
||||
const std::string & source_name,
|
||||
const std::string & source_description,
|
||||
const std::string & sink_name,
|
||||
|
||||
@@ -37,7 +37,7 @@ struct audio_device
|
||||
|
||||
virtual void process_mic_data(wivrn::audio_data &&) = 0;
|
||||
|
||||
static std::shared_ptr<audio_device> create(
|
||||
static std::unique_ptr<audio_device> create(
|
||||
const std::string & source_name,
|
||||
const std::string & source_description,
|
||||
const std::string & sink_name,
|
||||
|
||||
@@ -137,7 +137,7 @@ class wivrn_session : public xrt_system_devices
|
||||
std::mutex csv_mutex;
|
||||
std::ofstream feedback_csv;
|
||||
|
||||
std::shared_ptr<audio_device> audio_handle;
|
||||
std::unique_ptr<audio_device> audio_handle;
|
||||
|
||||
// run-time editable settings
|
||||
thread_safe<from_headset::settings_changed> settings;
|
||||
|
||||
Reference in New Issue
Block a user