mirror of
https://github.com/projectM-visualizer/projectm.git
synced 2026-02-15 00:15:32 +00:00
Implement external preset switching control and add stream loading support.
Lots of interconnected changes in this commit: - Removed unnecessary name/author/filename members all over the place. - Started using exceptions to deliver preset loading and rendering errors to the topmost ProjectM class. - Added stream loading methods to factories and the base Preset class. - Added new events for requesting preset switch and telling the user about loading errors. - Consolidated preset switching logic in ProjectM class a bit.
This commit is contained in:
@ -15,12 +15,12 @@ projectMWrapper::projectMWrapper(class ProjectM::Settings settings)
|
||||
{
|
||||
}
|
||||
|
||||
void projectMWrapper::PresetSwitchFailedEvent(bool isHardCut, const std::string& presetFilename,
|
||||
void projectMWrapper::PresetSwitchFailedEvent(const std::string& presetFilename,
|
||||
const std::string& failureMessage) const
|
||||
{
|
||||
if (_presetSwitchFailedEventCallback)
|
||||
{
|
||||
_presetSwitchFailedEventCallback(isHardCut, presetFilename.c_str(),
|
||||
_presetSwitchFailedEventCallback(presetFilename.c_str(),
|
||||
failureMessage.c_str(), _presetSwitchFailedEventUserData);
|
||||
}
|
||||
}
|
||||
@ -417,12 +417,6 @@ void projectm_set_window_size(projectm_handle instance, size_t width, size_t hei
|
||||
projectMInstance->ResetOpenGL(width, height);
|
||||
}
|
||||
|
||||
bool projectm_get_error_loading_current_preset(projectm_handle instance)
|
||||
{
|
||||
auto projectMInstance = handle_to_instance(instance);
|
||||
return projectMInstance->ErrorLoadingCurrentPreset();
|
||||
}
|
||||
|
||||
unsigned int projectm_pcm_get_max_samples()
|
||||
{
|
||||
return Pcm::maxSamples;
|
||||
|
||||
Reference in New Issue
Block a user