Skip to content

Commit

Permalink
qtcollider: support String:-speak when Speech class is available
Browse files Browse the repository at this point in the history
  • Loading branch information
jleben committed Feb 11, 2013
1 parent c28f620 commit a0b8efa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions SCClassLibrary/Common/Collections/String.sc
Expand Up @@ -482,6 +482,7 @@ String[char] : RawArray {
}

speak { arg channel = 0, force = false;
// FIXME: this should better be handled by Platform than GUI
var speech = GUI.current.speech;
if( speech.initialized.not, { speech.init });
speech.channels[ channel ].speak( this, force );
Expand Down
2 changes: 2 additions & 0 deletions SCClassLibrary/QtCollider/QtGUI.sc
Expand Up @@ -85,6 +85,8 @@ QtGUI {
*font { ^QFont }
*image { ^this.notImplemented( "Image" ) }

*speech { ^'Speech'.asClass }

*notImplemented { arg class;
//("QtGUI: " ++ class.asString ++ " is not implemented yet").postln;
^nil;
Expand Down

0 comments on commit a0b8efa

Please sign in to comment.