| Revision | 4436ba4125ca65563ade344da2e7050140b7dcf6 (tree) |
|---|---|
| Time | 2012-02-22 00:43:01 |
| Author | qwerty2501 <riot313@gmai...> |
| Commiter | qwerty2501 |
読み上げ機能変更
| @@ -149,22 +149,28 @@ void COpenJtalkCore::SynthesisThreadFunction(void *userData){ | ||
| 149 | 149 | |
| 150 | 150 | if(dwRslt- WAIT_OBJECT_0 == 1)break; |
| 151 | 151 | else if(dwRslt- WAIT_OBJECT_0 == 0){ |
| 152 | - CString synthesisString; | |
| 153 | - SynthesisQueue synthesisQueueCopy; | |
| 152 | + CString synthesisString(TEXT("")); | |
| 153 | + | |
| 154 | 154 | self.synthesisQueueCS.Lock(); |
| 155 | 155 | |
| 156 | - synthesisQueueCopy = self.synthesisQueue; | |
| 157 | - self.synthesisQueue.clear(); | |
| 156 | + | |
| 158 | 157 | |
| 158 | + auto rbegin = self.synthesisQueue.rbegin(); | |
| 159 | + auto rend = self.synthesisQueue.rend(); | |
| 159 | 160 | |
| 161 | + for(;rbegin != rend;(++rbegin)){ | |
| 162 | + synthesisString += *rbegin; | |
| 163 | + | |
| 164 | + if(rbegin != rend){ | |
| 165 | + synthesisString += TEXT(" "); | |
| 166 | + } | |
| 167 | + } | |
| 168 | + self.synthesisQueue.clear(); | |
| 160 | 169 | self.synthesisQueueCS.Unlock(); |
| 161 | 170 | |
| 162 | - auto rbegin = synthesisQueueCopy.rbegin(); | |
| 163 | - auto rend = synthesisQueueCopy.rend(); | |
| 171 | + | |
| 164 | 172 | |
| 165 | - for(;rbegin != rend;++rbegin){ | |
| 166 | - self.Synthesis((const TChar_P)(const wchar_t*)*rbegin); | |
| 167 | - } | |
| 173 | + self.Synthesis((const TChar_P)(const wchar_t*)synthesisString); | |
| 168 | 174 | } |
| 169 | 175 | |
| 170 | 176 |