diff --git a/src/diskwriter.cxx b/src/diskwriter.cxx new file mode 100644 index 0000000..954377e --- /dev/null +++ b/src/diskwriter.cxx @@ -0,0 +1,25 @@ + +#include "diskwriter.hxx" + +DiskWriter::DiskWriter() +{ +}; + +void DiskWriter::writeAudioBuffer(int track, int scene, AudioBuffer* ab ) +{ + // add the track / scene / name combo to audioConfig JSON node + + // write the AudioBuffer contents to /samples/ as .wav + // or alternatively t__s_.wav + +} + +void DiskWriter::writeSession( std::string path, std::string sessionName ) +{ + // write the audioConfig JSON node to /samples/sample.cfg + + + // write session.luppp JSON node to /.luppp + + +} diff --git a/src/diskwriter.hxx b/src/diskwriter.hxx new file mode 100644 index 0000000..16803da --- /dev/null +++ b/src/diskwriter.hxx @@ -0,0 +1,28 @@ + +#ifndef LUPPP_DISK_WRITER_H +#define LUPPP_DISK_WRITER_H + +#include + +class AudioBuffer; + +/** DiskWriter + * This class writes soundfiles to disk, and keeps track of which filename was + * in which track/scene combo in the grid. This metadata is then written to the + * .luppp file. +**/ +class DiskWriter +{ + public: + DiskWriter(); + + /// writes a single audio buffer to disk + void writeAudioBuffer(int track, int scene, AudioBuffer* ab ); + + void writeSession( std::string path, std::string sessionName ); + + private: + +}; + +#endif // LUPPP_DISK_WRITER_H