Merge branch 'master' of https://github.com/falkTX/sfizz into falkTX-master
This commit is contained in:
commit
8d3e8299dd
6 changed files with 54 additions and 7 deletions
12
.gitignore
vendored
12
.gitignore
vendored
|
|
@ -6,4 +6,14 @@ build-reldeb
|
||||||
build-debug
|
build-debug
|
||||||
.vscode
|
.vscode
|
||||||
perf.data
|
perf.data
|
||||||
perf.data.old
|
perf.data.old
|
||||||
|
|
||||||
|
Makefile
|
||||||
|
CMakeCache.txt
|
||||||
|
CMakeFiles/
|
||||||
|
cmake_install.cmake
|
||||||
|
compile_commands.json
|
||||||
|
*.a
|
||||||
|
|
||||||
|
clients/sfizz_jack
|
||||||
|
clients/sfzprint
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,8 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND NOT ANDROID)
|
||||||
add_compile_options(-stdlib=libc++)
|
add_compile_options(-stdlib=libc++)
|
||||||
# Presumably need the above for linking too, maybe other options missing as well
|
# Presumably need the above for linking too, maybe other options missing as well
|
||||||
add_link_options(-stdlib=libc++) # New command on CMake master, not in 3.12 release
|
add_link_options(-stdlib=libc++) # New command on CMake master, not in 3.12 release
|
||||||
|
else()
|
||||||
|
add_link_options(-lstdc++fs)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (UNIX)
|
if (UNIX)
|
||||||
|
|
|
||||||
|
|
@ -23,8 +23,8 @@
|
||||||
|
|
||||||
#include "Parser.h"
|
#include "Parser.h"
|
||||||
#include "StringViewHelpers.h"
|
#include "StringViewHelpers.h"
|
||||||
|
#include "filesystem.h"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <filesystem>
|
|
||||||
#include <string_view>
|
#include <string_view>
|
||||||
#include <absl/flags/parse.h>
|
#include <absl/flags/parse.h>
|
||||||
#include <absl/types/span.h>
|
#include <absl/types/span.h>
|
||||||
|
|
@ -92,4 +92,4 @@ int main(int argc, char** argv)
|
||||||
std::cout << '\t' << define.first << '=' << define.second << '\n';
|
std::cout << '\t' << define.first << '=' << define.second << '\n';
|
||||||
// spdlog::info("Done!");
|
// spdlog::info("Done!");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,9 +27,9 @@
|
||||||
#include "LeakDetector.h"
|
#include "LeakDetector.h"
|
||||||
#include "AudioBuffer.h"
|
#include "AudioBuffer.h"
|
||||||
#include "Voice.h"
|
#include "Voice.h"
|
||||||
|
#include "filesystem.h"
|
||||||
#include "readerwriterqueue.h"
|
#include "readerwriterqueue.h"
|
||||||
#include <absl/container/flat_hash_map.h>
|
#include <absl/container/flat_hash_map.h>
|
||||||
#include <filesystem>
|
|
||||||
#include <optional>
|
#include <optional>
|
||||||
#include <string_view>
|
#include <string_view>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
|
|
@ -76,4 +76,4 @@ private:
|
||||||
absl::flat_hash_map<std::string_view, std::shared_ptr<AudioBuffer<float>>> preloadedData;
|
absl::flat_hash_map<std::string_view, std::shared_ptr<AudioBuffer<float>>> preloadedData;
|
||||||
LEAK_DETECTOR(FilePool);
|
LEAK_DETECTOR(FilePool);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#include "Opcode.h"
|
#include "Opcode.h"
|
||||||
#include <filesystem>
|
#include "filesystem.h"
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <regex>
|
#include <regex>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
@ -57,4 +57,4 @@ private:
|
||||||
void readSfzFile(const std::filesystem::path& fileName, std::vector<std::string>& lines) noexcept;
|
void readSfzFile(const std::filesystem::path& fileName, std::vector<std::string>& lines) noexcept;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace sfz
|
} // namespace sfz
|
||||||
|
|
|
||||||
35
sfizz/filesystem.h
Normal file
35
sfizz/filesystem.h
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
// Copyright (c) 2019, Paul Ferrand
|
||||||
|
// All rights reserved.
|
||||||
|
|
||||||
|
// Redistribution and use in source and binary forms, with or without
|
||||||
|
// modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
// 1. Redistributions of source code must retain the above copyright notice, this
|
||||||
|
// list of conditions and the following disclaimer.
|
||||||
|
// 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
// this list of conditions and the following disclaimer in the documentation
|
||||||
|
// and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||||
|
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||||
|
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
|
// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#if defined(__cpp_lib_filesystem) || (defined(__has_include) && __has_include(<filesystem>))
|
||||||
|
#include <filesystem>
|
||||||
|
#elif defined(__cpp_lib_experimental_filesystem) || (defined(__has_include) && __has_include(<experimental/filesystem>))
|
||||||
|
#include <experimental/filesystem>
|
||||||
|
namespace std {
|
||||||
|
namespace filesystem = std::experimental::filesystem;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
#error no filesystem support
|
||||||
|
#endif
|
||||||
Loading…
Add table
Reference in a new issue