diff options
Diffstat (limited to 'futuregael')
| -rw-r--r-- | futuregael/bin/data/show.csv | 2 | ||||
| -rw-r--r-- | futuregael/src/ofApp.cpp | 18 | ||||
| -rw-r--r-- | futuregael/src/ofApp.h | 2 |
3 files changed, 19 insertions, 3 deletions
diff --git a/futuregael/bin/data/show.csv b/futuregael/bin/data/show.csv index 1c9f752..795ddda 100644 --- a/futuregael/bin/data/show.csv +++ b/futuregael/bin/data/show.csv @@ -1,2 +1,4 @@ Inneall Intleacht Shaorga mé.mp3|00A8FF,FFB700,FF3082|Inneall Intleacht Shaorga mé, le cumhacht agus críonnacht chuile cleamhnais a bhí riamh ann. Tá beirt tagtha chugainn anocht chun leigheas a chuir ar a gcuid uaigneas go deo, le cabhair uaimse. Briseadh bualadh bos. Go raibh maith agaibh, tá míle fáílte romhaibh anseo chuig Sráid Láir na Gaillimhe, don chéad babhta eile liomsa - an Inneall Cleamhnais agus Cuardach Croíthe. Casaimid lenár gcroíthe.mp3|E27D60,085DCB,E8A87C,C38D9E,41B3A3|Casaimid lenár gcroíthe anois. +Agus ní ghlacann an inneall seo.mp3|00A8FF,FFB700,FF3082|Agus ní ghlacann an inneall seo freagracht as timpistí nó toradh ar bith bainteach le saorthoil aon rannpháirtí. + diff --git a/futuregael/src/ofApp.cpp b/futuregael/src/ofApp.cpp index 9d69e27..fe007e8 100644 --- a/futuregael/src/ofApp.cpp +++ b/futuregael/src/ofApp.cpp @@ -6,8 +6,7 @@ void ofApp::setup(){ // Load a CSV File. if(csv.load("show.csv","|")) { - ofLog()<<"found "<<csv.getNumRows()<<" lines in show"; - + for (auto row:csv){ if (row.size()<2){ ofLog()<<"Error, found row with "<<row.size()<<" elements"; @@ -15,8 +14,11 @@ void ofApp::setup(){ else script.push_back(scriptLine(row[0],row[1],row[2])); } - } + ofLog()<<"loaded show, "<<csv.getNumRows()<<" lines"; + playline=script.begin(); + } + else playline=script.end(); } @@ -58,6 +60,16 @@ void ofApp::keyReleased(int key){ case OF_KEY_DOWN:{ break; } + case ' ':{ + if (playline->audio.isPlaying()){ + playline->audio.stop(); + } + else playline->audio.play(); + break; + } + default:{ + break; + } } } diff --git a/futuregael/src/ofApp.h b/futuregael/src/ofApp.h index ceb537b..f627e48 100644 --- a/futuregael/src/ofApp.h +++ b/futuregael/src/ofApp.h @@ -40,4 +40,6 @@ class ofApp : public ofBaseApp{ ofxCsv csv; vector<scriptLine> script; + + vector<scriptLine>::iterator playline; }; |
