#ifndef XSPEAKERMAP_H
#define XSPEAKERMAP_H

#include "xasset.h"
#include "xaudiochannelmap.h"
#include "xstring.h"

#define MAP_DIM 2

class XSpeakerMap : public XAsset
{
public:
    XSpeakerMap();
    ~XSpeakerMap();

    static QVector<QVector<XAudioChannelMap *> > ChannelArrayToMap(const QVector<XAudioChannelMap*> aChannelArray);

    void SetIsDefault(bool aIsDefault);
    bool IsDefault() const;

    XAudioChannelMap* GetChannelMapEntry(int aRow, int aCol);

    virtual QVector<XAudioChannelMap*> ParseChannelArray(XDataStream *aStream, int aCount);
    virtual void ParseData(XDataStream* aStream) override;
    virtual void Clear() override;

private:
    bool mIsDefault;
    XString* mName;
    QVector<QVector<XAudioChannelMap*>> mChannelMaps;
};

#endif // XSPEAKERMAP_H
