-Working on DiskWriter class

main
Harry van Haaren 2013-09-03 19:35:43 +01:00
parent 298b18af04
commit 07a6aa7d6d
2 changed files with 53 additions and 0 deletions

25
src/diskwriter.cxx Normal file
View File

@ -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 <path>/samples/ as <name>.wav
// or alternatively t_<track>_s_<scene>.wav
}
void DiskWriter::writeSession( std::string path, std::string sessionName )
{
// write the audioConfig JSON node to <path>/samples/sample.cfg
// write session.luppp JSON node to <path>/<sessionName>.luppp
}

28
src/diskwriter.hxx Normal file
View File

@ -0,0 +1,28 @@
#ifndef LUPPP_DISK_WRITER_H
#define LUPPP_DISK_WRITER_H
#include <string>
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();
/// 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