aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chuck/OSCGraphics.ck5
-rw-r--r--src/recorder.cpp5
2 files changed, 8 insertions, 2 deletions
diff --git a/chuck/OSCGraphics.ck b/chuck/OSCGraphics.ck
index 82da22e..49a8003 100644
--- a/chuck/OSCGraphics.ck
+++ b/chuck/OSCGraphics.ck
@@ -16,10 +16,11 @@ public class OSCGraphics {
return file;
}
- fun static void
- stopRecord()
+ fun static string
+ record()
{
osc_send.startMsg("/recorder/stop", "");
+ return "";
}
fun static OSCGraphicsImage @
diff --git a/src/recorder.cpp b/src/recorder.cpp
index 13e2b13..6859f1b 100644
--- a/src/recorder.cpp
+++ b/src/recorder.cpp
@@ -69,6 +69,11 @@ Recorder::start(const char *filename)
-1, 0, -1, -1, -1, -1 /* no audio */
};
+ if (!filename || !*filename) {
+ stop();
+ return;
+ }
+
lock();
SDL_FFMPEGFREE_SAFE(file);