shithub: candycrisis

ref: 6e467c170e62f4a5fe7c9ea677cecb540c043a0d
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 ClearImplementation() override {};
    void RewindImplementation() override {};
    void FillBuffer(int16_t* buffer, int length) override;

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