migrate from std::filesystem::path to io::path (WIP)

This commit is contained in:
MihailRis
2025-01-30 22:23:13 +03:00
parent 1e22882284
commit e0314803c0
72 changed files with 1189 additions and 791 deletions
+5 -4
View File
@@ -6,6 +6,7 @@
#include <string>
#include <vector>
#include "io/io.hpp"
#include "audio/audio.hpp"
#include "debug/Logger.hpp"
@@ -118,11 +119,11 @@ public:
}
};
std::unique_ptr<audio::PCMStream> wav::create_stream(const fs::path& file) {
std::ifstream in(file, std::ios::binary);
std::unique_ptr<audio::PCMStream> wav::create_stream(const io::path& file) {
std::ifstream in(io::resolve(file), std::ios::binary);
if (!in.is_open()) {
throw std::runtime_error(
"could not to open file '" + file.u8string() + "'"
"could not to open file '" + file.string() + "'"
);
}
@@ -234,7 +235,7 @@ std::unique_ptr<audio::PCMStream> wav::create_stream(const fs::path& file) {
}
std::unique_ptr<audio::PCM> wav::load_pcm(
const fs::path& file, bool headerOnly
const io::path& file, bool headerOnly
) {
auto stream = wav::create_stream(file);