OSDN Git Service

読み上げ機能変更
authorqwerty2501 <riot313@gmail.com>
Tue, 21 Feb 2012 15:43:01 +0000 (00:43 +0900)
committerqwerty2501 <riot313@gmail.com>
Tue, 21 Feb 2012 15:43:01 +0000 (00:43 +0900)
nlite.suo
speaker/open_jtalk_core.cpp

index 4b8b938..be11a29 100644 (file)
Binary files a/nlite.suo and b/nlite.suo differ
index 81dd2ff..a8b2d93 100644 (file)
@@ -149,22 +149,28 @@ void  COpenJtalkCore::SynthesisThreadFunction(void *userData){
 
                if(dwRslt-  WAIT_OBJECT_0 == 1)break;
                else if(dwRslt-  WAIT_OBJECT_0 == 0){
-                       CString synthesisString;
-                       SynthesisQueue synthesisQueueCopy;
+                       CString synthesisString(TEXT(""));
+                       
                        self.synthesisQueueCS.Lock();
 
-                       synthesisQueueCopy = self.synthesisQueue;
-                       self.synthesisQueue.clear();
+                        
                        
+                       auto rbegin = self.synthesisQueue.rbegin();
+                       auto rend = self.synthesisQueue.rend();
 
+                       for(;rbegin != rend;(++rbegin)){
+                               synthesisString += *rbegin;
+
+                               if(rbegin != rend){
+                                       synthesisString += TEXT(" ");
+                               }
+                       }
+                       self.synthesisQueue.clear();
                        self.synthesisQueueCS.Unlock();
 
-                       auto rbegin = synthesisQueueCopy.rbegin();
-                       auto rend = synthesisQueueCopy.rend();
+                       
 
-                       for(;rbegin != rend;++rbegin){
-                               self.Synthesis((const TChar_P)(const wchar_t*)*rbegin);
-                       }
+                       self.Synthesis((const TChar_P)(const wchar_t*)synthesisString);
                }