shithub: candycrisis

ref: ca955c83642c7c7944c022b28ed84fb4daba75b3
dir: /src/support/ModStream.h/

View raw version
#pragma once

#include "cmixer.h"

namespace ibxm {
extern "C" {
#include "ibxm.h"
}
}

namespace cmixer {
class ModStream : public Source {
    ibxm::module* module;
    ibxm::replay* replay;
    std::vector<char> moduleFile;
    std::vector<int> replayBuffer;
    int rbOffset;
    int rbLength;
    double playbackSpeedMult;

    void Rewind2();
    void FillBuffer(int16_t* buffer, int length);

public:
    ModStream(std::vector<char>&& rawModule);
    void SetPlaybackSpeed(double f);
};
}