File size: 599 Bytes
d5ee97c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#pragma once
/*
 VoxCommon.hpp : Defines common data structures and constants to be used with TensorVox 
*/
#include <iostream>
#include <vector>
#include "AudioFile.h"
// #include "ext/CppFlow/include/Tensor.h"
// #include <stdexcept>

#define IF_RETURN(cond,ret) if (cond){return ret;}
#define VX_IF_EXCEPT(cond,ex) if (cond){throw std::invalid_argument(ex);}


template<typename T>
struct TFTensor {
	std::vector<T> Data;
	std::vector<int64_t> Shape;
	size_t TotalSize;
};

namespace VoxUtil {

	void ExportWAV(const std::string& Filename, const std::vector<float>& Data, unsigned SampleRate);
}