refine code
fix bug that listbox may throw std::runtime when the modal is enabled fix bug that textbox attachs a wrong event angent
This commit is contained in:
@@ -184,7 +184,7 @@ namespace nana{namespace audio
|
||||
{
|
||||
#if defined(NANA_WINDOWS)
|
||||
std::lock_guard<decltype(queue_lock_)> lock(queue_lock_);
|
||||
done_queue_.push_back(m);
|
||||
done_queue_.emplace_back(m);
|
||||
if(m->dwFlags & WHDR_PREPARED)
|
||||
wave_native_if.out_unprepare(handle_, m, sizeof(WAVEHDR));
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace nana{ namespace audio
|
||||
m->bufsize = ck.nAvgBytesPerSec;
|
||||
m->buf = rawbuf + sizeof(meta);
|
||||
#endif
|
||||
prepared_.push_back(m);
|
||||
prepared_.emplace_back(m);
|
||||
}
|
||||
|
||||
thr_ = std::move(std::thread([this](){this->_m_prepare_routine();}));
|
||||
@@ -79,7 +79,7 @@ namespace nana{ namespace audio
|
||||
{
|
||||
std::lock_guard<decltype(token_prepared_)> lock(token_prepared_);
|
||||
bool if_signal = prepared_.empty();
|
||||
prepared_.push_back(m);
|
||||
prepared_.emplace_back(m);
|
||||
if(if_signal)
|
||||
cond_prepared_.notify_one();
|
||||
}
|
||||
@@ -148,7 +148,7 @@ namespace nana{ namespace audio
|
||||
m->bufsize = buffered;
|
||||
#endif
|
||||
std::lock_guard<decltype(token_buffer_)> lock(token_buffer_);
|
||||
buffer_.push_back(m);
|
||||
buffer_.emplace_back(m);
|
||||
if(wait_for_buffer_)
|
||||
{
|
||||
cond_buffer_.notify_one();
|
||||
|
||||
Reference in New Issue
Block a user