From b46286b8262cd5a4b96ac318a6d85d3db39e09e5 Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Mon, 18 Nov 2013 15:29:40 +0000 Subject: lyrics rough version --- rotord/src/nodes_drawing.h | 2 +- rotord/src/rotor.h | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) (limited to 'rotord/src') diff --git a/rotord/src/nodes_drawing.h b/rotord/src/nodes_drawing.h index 914f064..77a74cb 100644 --- a/rotord/src/nodes_drawing.h +++ b/rotord/src/nodes_drawing.h @@ -125,7 +125,7 @@ namespace Rotor { ~Lyrics(){}; Lyrics* clone(map &_settings) { return new Lyrics(_settings);}; string select_text(const Frame_spec &frame){ - return "Hello, world!"; + return ((Lyrics_attribute*)attributes["lyrics"])->get_lyric((Time_spec)frame); } private: }; diff --git a/rotord/src/rotor.h b/rotord/src/rotor.h index 1c8e992..0833096 100644 --- a/rotord/src/rotor.h +++ b/rotord/src/rotor.h @@ -264,13 +264,19 @@ namespace Rotor { for (auto l:lyrics){ cerr<second.first<<","<<(l->first)<<" ("<<(l->second.second)<<")"<l->first)&&((time.time-l->first) < l->second.second)) return l->second.first; + } + return ""; } private: - std::map > lyrics; - + std::map > lyrics; //lyrics[startime]=pair }; class Node{ public: -- cgit v1.2.3