2013-09-03 20:35:43 +02:00
|
|
|
|
|
|
|
#ifndef LUPPP_DISK_WRITER_H
|
|
|
|
#define LUPPP_DISK_WRITER_H
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
2013-09-03 21:06:11 +02:00
|
|
|
#include "cjson/cJSON.h"
|
|
|
|
|
2013-09-03 20:35:43 +02:00
|
|
|
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
|
|
|
|
* <sessionName>.luppp file.
|
|
|
|
**/
|
|
|
|
class DiskWriter
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
DiskWriter();
|
|
|
|
|
2013-09-03 23:04:03 +02:00
|
|
|
void initialize( std::string path, std::string sessionName );
|
|
|
|
|
2013-09-03 20:35:43 +02:00
|
|
|
/// writes a single audio buffer to disk
|
|
|
|
void writeAudioBuffer(int track, int scene, AudioBuffer* ab );
|
|
|
|
|
|
|
|
void writeSession( std::string path, std::string sessionName );
|
|
|
|
|
|
|
|
private:
|
2013-09-03 21:06:11 +02:00
|
|
|
cJSON* session;
|
2013-09-03 23:04:03 +02:00
|
|
|
cJSON* sample;
|
|
|
|
|
|
|
|
std::string sessionName;
|
|
|
|
std::string sessionPath;
|
|
|
|
|
2013-09-03 20:35:43 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // LUPPP_DISK_WRITER_H
|