#pragma once

#include <memory>
#include <string>

class AudioDevice
{

public:

    AudioDevice();

    ~AudioDevice();

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

    void SetSampleRate(unsigned rate);

    unsigned GetSampleRate() const;

    void SetName(const std::string& name);

    void SetNumChannels(unsigned numChannels);

    void SetPeriod(unsigned period);

    void SetBufferSize(std::size_t bufferSize);

    unsigned GetNumChannels() const;

    unsigned GetPeriod() const;

    std::size_t GetBufferSize() const;

    std::string GetName() const;

private:

    std::string mName {"unset"};
    unsigned mSampleRate {44100};
    unsigned mNumChannels {1};
    unsigned mPeriod {2};
    std::size_t mBufferSize{0};
};

using AudioDevicePtr = std::unique_ptr<AudioDevice>;
