#pragma once

#include "IAudioInterface.h"
#include "AudioDevice.h"

#include <memory>
#include <vector>

class AudioManager
{

public:

    AudioManager();

    ~AudioManager();

    static std::unique_ptr<AudioManager> Create();

    void AddAudioDevice(AudioDevicePtr device);

    std::size_t GetNumAudioDevices() const;

    AudioDevice* GetAudioDevice(unsigned idx) const;

    IAudioInterface* GetAudioInterface();

    void Play();

private:
    std::vector<AudioDevicePtr> mAudioDevices;
    IAudioInterfaceUPtr mAudioInterface;
};

using AudioManagerUPtr = std::unique_ptr<AudioManager>;
