Skip to content

Commit

Permalink
getBearDataFileDirectory function
Browse files Browse the repository at this point in the history
  • Loading branch information
firthm01 committed Jan 4, 2024
1 parent 8eba33e commit c7d4a42
Showing 1 changed file with 15 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,17 @@ struct BufferTraits<juce::AudioBuffer<float>> {
}
};

juce::File getBearDataFileDirectory(){
auto vstPath = juce::File::getSpecialLocation(
juce::File::SpecialLocationType::currentExecutableFile);
vstPath = vstPath.getParentDirectory();
#ifdef __APPLE__
vstPath = vstPath.getParentDirectory();
vstPath = vstPath.getChildFile("Resources");
#endif
return vstPath;
};

} // namespace plugin
} // namespace ear

Expand Down Expand Up @@ -128,15 +139,10 @@ EarBinauralMonitoringAudioProcessor::EarBinauralMonitoringAudioProcessor()
connector_->parameterValueChanged(11, oscInvertQuatY_->get());
connector_->parameterValueChanged(12, oscInvertQuatZ_->get());

auto vstPath = juce::File::getSpecialLocation(
juce::File::SpecialLocationType::currentExecutableFile);
vstPath = vstPath.getParentDirectory();
#ifdef __APPLE__
vstPath = vstPath.getParentDirectory();
vstPath = vstPath.getChildFile("Resources");
#endif
vstPath = vstPath.getChildFile(BEAR_DATA_FILE);
bearDataFilePath = vstPath.getFullPathName().toStdString();
bearDataFilePath = getBearDataFileDirectory()
.getChildFile(BEAR_DATA_FILE)
.getFullPathName()
.toStdString();

oscReceiver.onReceiveEuler = [this](ListenerOrientation::Euler euler) {
connector_->setEuler(euler);
Expand Down

0 comments on commit c7d4a42

Please sign in to comment.