mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-15 12:20:01 +01:00
OSC message fror session open, close and save
This commit is contained in:
@@ -37,6 +37,7 @@
|
|||||||
#include "SystemToolkit.h"
|
#include "SystemToolkit.h"
|
||||||
#include "tinyxml2Toolkit.h"
|
#include "tinyxml2Toolkit.h"
|
||||||
#include "Metronome.h"
|
#include "Metronome.h"
|
||||||
|
#include "TransitionView.h"
|
||||||
|
|
||||||
#include "UserInterfaceManager.h"
|
#include "UserInterfaceManager.h"
|
||||||
#include "RenderingManager.h"
|
#include "RenderingManager.h"
|
||||||
@@ -858,14 +859,38 @@ bool Control::receiveSessionAttribute(const std::string &attribute,
|
|||||||
}
|
}
|
||||||
send_feedback = true;
|
send_feedback = true;
|
||||||
}
|
}
|
||||||
else if ( attribute.compare(OSC_SESSION_FADE) == 0) {
|
else if ( attribute.compare(OSC_SESSION_OPEN) == 0) {
|
||||||
float v = 0.f, t = 0.f;
|
const char *filename;
|
||||||
arguments >> v;
|
arguments >> filename;
|
||||||
if (arguments.Eos())
|
if (arguments.Eos()) {
|
||||||
arguments >> osc::EndMessage;
|
arguments >> osc::EndMessage;
|
||||||
else
|
Mixer::manager().open(filename);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
float t = 0.f;
|
||||||
arguments >> t >> osc::EndMessage;
|
arguments >> t >> osc::EndMessage;
|
||||||
Mixer::manager().session()->setFadingTarget(v, t);
|
Settings::application.transition.duration = t;
|
||||||
|
Mixer::manager().open(filename, true);
|
||||||
|
TransitionView *tv = dynamic_cast<TransitionView*>( Mixer::manager().view(View::TRANSITION) );
|
||||||
|
tv->play(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ( attribute.compare(OSC_SESSION_SAVE) == 0) {
|
||||||
|
Mixer::manager().save();
|
||||||
|
}
|
||||||
|
else if ( attribute.compare(OSC_SESSION_CLOSE) == 0) {
|
||||||
|
if (arguments.Eos()) {
|
||||||
|
arguments >> osc::EndMessage;
|
||||||
|
Mixer::manager().close();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
float t = 0.f;
|
||||||
|
arguments >> t >> osc::EndMessage;
|
||||||
|
Settings::application.transition.duration = t;
|
||||||
|
Mixer::manager().close(true);
|
||||||
|
TransitionView *tv = dynamic_cast<TransitionView*>( Mixer::manager().view(View::TRANSITION) );
|
||||||
|
tv->play(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#ifdef CONTROL_DEBUG
|
#ifdef CONTROL_DEBUG
|
||||||
else {
|
else {
|
||||||
|
|||||||
@@ -59,7 +59,9 @@
|
|||||||
|
|
||||||
#define OSC_SESSION "/session"
|
#define OSC_SESSION "/session"
|
||||||
#define OSC_SESSION_VERSION "/version"
|
#define OSC_SESSION_VERSION "/version"
|
||||||
#define OSC_SESSION_FADE "/fade"
|
#define OSC_SESSION_OPEN "/open"
|
||||||
|
#define OSC_SESSION_SAVE "/save"
|
||||||
|
#define OSC_SESSION_CLOSE "/close"
|
||||||
|
|
||||||
#define OSC_MULTITOUCH "/multitouch"
|
#define OSC_MULTITOUCH "/multitouch"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user