#include "AudioDevice.h"

AudioDevice::AudioDevice()
    : mName("plughw:1,0"),
      mSampleRate(44100),
      mNumChannels(2),
      mPeriod(2),
      mBufferSize()
{

}

AudioDevice::~AudioDevice()
{

}

std::unique_ptr<AudioDevice> AudioDevice::Create()
{
    return std::make_unique<AudioDevice>();
}

bool AudioDevice::getIsOpen() const
{
    return mIsOpen;
}

unsigned AudioDevice::getNumChannels() const
{
    return mNumChannels;
}

unsigned AudioDevice::getPeriod() const
{
    return mPeriod;
}

std::size_t AudioDevice::getBufferSize() const
{
    return mBufferSize;
}

unsigned AudioDevice::getSampleRate() const
{
    return mSampleRate;
}

std::string AudioDevice::getName() const
{
    return mName;
}

void AudioDevice::setSampleRate(unsigned rate)
{
    mSampleRate = rate;
}

void AudioDevice::setName(const std::string& name)
{
    mName = name;
}

void AudioDevice::setNumChannels(unsigned numChannels)
{
    mNumChannels = numChannels;
}

void AudioDevice::setPeriod(unsigned period)
{
    mPeriod = period;
}

void AudioDevice::setBufferSize(std::size_t bufferSize)
{
    mBufferSize = bufferSize;
}

void AudioDevice::setIsOpen(bool isOpen)
{
    mIsOpen = isOpen;
}

