| 151 | } |
| 152 | |
| 153 | Voice::~Voice() { |
| 154 | m_stopThread = true; |
| 155 | |
| 156 | { |
| 157 | MutexLocker locker(m_threadMutex); |
| 158 | m_threadCond.broadcast(); |
| 159 | } |
| 160 | |
| 161 | m_thread.finish(); |
| 162 | |
| 163 | if (m_nextSaveTime) |
| 164 | save(); |
| 165 | |
| 166 | closeDevice(); |
| 167 | |
| 168 | s_singleton = nullptr; |
| 169 | } |
| 170 | |
| 171 | void Voice::init() { |
| 172 | resetEncoder(); |