summaryrefslogtreecommitdiff
path: root/tools/src/asset_processor/assets/aif.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/src/asset_processor/assets/aif.cpp')
-rw-r--r--tools/src/asset_processor/assets/aif.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/tools/src/asset_processor/assets/aif.cpp b/tools/src/asset_processor/assets/aif.cpp
new file mode 100644
index 00000000..f0c056af
--- /dev/null
+++ b/tools/src/asset_processor/assets/aif.cpp
@@ -0,0 +1,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);
+} \ No newline at end of file