blob: f0c056af107fb6705c09cdd7abc6a7c24486a242 (
plain)
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
27
|
#include "aif.h"
#include "util.h"
std::filesystem::path AifAsset::generateAssetPath() {
std::filesystem::path path = this->path;
return path.replace_extension(".aif");
}
void AifAsset::convertToHumanReadable(const std::vector<char>& baserom) {
(void)baserom;
std::filesystem::path toolsPath = "tools";
std::vector<std::string> cmd;
cmd.push_back(toolsPath / "aif2pcm" / "aif2pcm");
cmd.push_back(this->path);
cmd.push_back(this->assetPath);
check_call(cmd);
}
void AifAsset::buildToBinary() {
std::filesystem::path toolsPath = "tools";
std::vector<std::string> cmd;
cmd.push_back(toolsPath / "aif2pcm" / "aif2pcm");
cmd.push_back(this->assetPath);
cmd.push_back(this->path);
check_call(cmd);
}
|