summaryrefslogtreecommitdiffstats
path: root/src/audio_core
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-08-02 05:55:59 +0200
committerLioncash <mathew1800@gmail.com>2018-08-02 05:56:02 +0200
commit2bc4ab395850efa84ba879c7a9bcff5df6768a39 (patch)
treeb98ab7cd3c22772ba4108c3c8e7f8185f3caf09a /src/audio_core
parentsink_details: std::move std::function instances (diff)
downloadyuzu-2bc4ab395850efa84ba879c7a9bcff5df6768a39.tar
yuzu-2bc4ab395850efa84ba879c7a9bcff5df6768a39.tar.gz
yuzu-2bc4ab395850efa84ba879c7a9bcff5df6768a39.tar.bz2
yuzu-2bc4ab395850efa84ba879c7a9bcff5df6768a39.tar.lz
yuzu-2bc4ab395850efa84ba879c7a9bcff5df6768a39.tar.xz
yuzu-2bc4ab395850efa84ba879c7a9bcff5df6768a39.tar.zst
yuzu-2bc4ab395850efa84ba879c7a9bcff5df6768a39.zip
Diffstat (limited to 'src/audio_core')
-rw-r--r--src/audio_core/sink_details.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/audio_core/sink_details.h b/src/audio_core/sink_details.h
index 4f9027762..ea666c554 100644
--- a/src/audio_core/sink_details.h
+++ b/src/audio_core/sink_details.h
@@ -14,16 +14,18 @@ namespace AudioCore {
class Sink;
struct SinkDetails {
- SinkDetails(const char* id_, std::function<std::unique_ptr<Sink>(std::string)> factory_,
- std::function<std::vector<std::string>()> list_devices_)
+ using FactoryFn = std::function<std::unique_ptr<Sink>(std::string)>;
+ using ListDevicesFn = std::function<std::vector<std::string>()>;
+
+ SinkDetails(const char* id_, FactoryFn factory_, ListDevicesFn list_devices_)
: id(id_), factory(std::move(factory_)), list_devices(std::move(list_devices_)) {}
/// Name for this sink.
const char* id;
/// A method to call to construct an instance of this type of sink.
- std::function<std::unique_ptr<Sink>(std::string device_id)> factory;
+ FactoryFn factory;
/// A method to call to list available devices.
- std::function<std::vector<std::string>()> list_devices;
+ ListDevicesFn list_devices;
};
extern const std::vector<SinkDetails> g_sink_details;