sink_details.h 639 B

123456789101112131415161718192021222324252627
  1. // Copyright 2016 Citra Emulator Project
  2. // Licensed under GPLv2 or any later version
  3. // Refer to the license.txt file included.
  4. #pragma once
  5. #include <functional>
  6. #include <memory>
  7. #include <vector>
  8. namespace AudioCore {
  9. class Sink;
  10. struct SinkDetails {
  11. SinkDetails(const char* id_, std::function<std::unique_ptr<Sink>()> factory_)
  12. : id(id_), factory(factory_) {}
  13. /// Name for this sink.
  14. const char* id;
  15. /// A method to call to construct an instance of this type of sink.
  16. std::function<std::unique_ptr<Sink>()> factory;
  17. };
  18. extern const std::vector<SinkDetails> g_sink_details;
  19. } // namespace AudioCore