Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

* say async play #26

Closed
wants to merge 3 commits into from
Closed

* say async play #26

wants to merge 3 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Sep 24, 2016

Play the Say UI not blocking
Turned to the play async say

issue : #2

@youknowone

* UI not blocking
@@ -57,6 +57,8 @@ class ViewController: NSViewController {
let voiceSavePanel = NSSavePanel()
/// Open panel for "Open" menu
let textOpenPanel = NSOpenPanel()

var sayObj: Say! = nil;
Copy link
Owner

@youknowone youknowone Sep 25, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think instance variable is not nessessary here. Swift will capture the variable into the dispatch queue blocks.

@@ -92,10 +94,22 @@ class ViewController: NSViewController {

@IBAction func say(_ sender: NSControl) {
sender.isEnabled = false
Say(text: self.textForSpeech, voice: self.selectedVoice).play(true)
sender.isEnabled = true
self.sayObj = Say(text: self.textForSpeech, voice: self.selectedVoice)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider to use local variable say instead of self.sayObj.
Generally in apple environment, we don't like to use abbr like 'Obj'.

@youknowone
Copy link
Owner

This patch is perfect except for the naming and scope issues. Thanks for nice work.

sikeeo added 2 commits September 26, 2016 23:17
@youknowone
Copy link
Owner

I am sorry but now it is fixed in other patches. Will you check it?
It is my fault. I forgot that it is specially blocked by blocking option. I am sorry to confuse you.

@ghost
Copy link
Author

ghost commented Sep 27, 2016

I close this pull request

@ghost ghost closed this Sep 27, 2016
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant