-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A simple standalone save/retrieve (#190)
- Standalone tries to save and retrieve state on start and stop - Requires an OS specific default path which is only coded on macos now - Currently uses use the raw data stream; obviously we want to expand this with an envelope for standalone settings in the near future
- Loading branch information
Showing
5 changed files
with
147 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
|
||
#include <Foundation/Foundation.h> | ||
#include "detail/standalone/standalone_host.h" | ||
|
||
namespace freeaudio::clap_wrapper::standalone | ||
{ | ||
std::optional<fs::path> getStandaloneSettingsPath() | ||
{ | ||
auto *fileManager = [NSFileManager defaultManager]; | ||
auto *resultURLs = [fileManager URLsForDirectory:NSApplicationSupportDirectory | ||
inDomains:NSUserDomainMask]; | ||
if (resultURLs) | ||
{ | ||
auto *u = [resultURLs objectAtIndex:0]; | ||
return fs::path{[u fileSystemRepresentation]} / "clap-wrapper-standalone"; | ||
} | ||
return std::nullopt; | ||
} | ||
} // namespace freeaudio::clap_wrapper::standalone |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters