[App] Simplify and improve factory template.

[App] Rework audio and input system creation.
This commit is contained in:
gibbed
2019-08-03 17:01:34 -05:00
parent 848e2a4088
commit f5cddbbf3f
3 changed files with 90 additions and 63 deletions

View File

@@ -21,6 +21,8 @@ class NopAudioSystem : public AudioSystem {
explicit NopAudioSystem(cpu::Processor* processor);
~NopAudioSystem() override;
static bool IsAvailable() { return true; }
static std::unique_ptr<AudioSystem> Create(cpu::Processor* processor);
X_STATUS CreateDriver(size_t index, xe::threading::Semaphore* semaphore,

View File

@@ -21,6 +21,8 @@ class XAudio2AudioSystem : public AudioSystem {
explicit XAudio2AudioSystem(cpu::Processor* processor);
~XAudio2AudioSystem() override;
static bool IsAvailable() { return true; }
static std::unique_ptr<AudioSystem> Create(cpu::Processor* processor);
X_RESULT CreateDriver(size_t index, xe::threading::Semaphore* semaphore,