diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2015-05-04 11:16:28 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2015-05-04 11:16:59 +0200 |
commit | 6ed3918317cb9b20ece88a46daaccc52d974b7bd (patch) | |
tree | f95bf412f06260e20c62aa7fa799f42554105283 /src/AlsaInput.h | |
parent | 957f67c0a5bf831ff743d03548e515ddc450e8cc (diff) | |
download | fdk-aac-dabplus-6ed3918317cb9b20ece88a46daaccc52d974b7bd.tar.gz fdk-aac-dabplus-6ed3918317cb9b20ece88a46daaccc52d974b7bd.tar.bz2 fdk-aac-dabplus-6ed3918317cb9b20ece88a46daaccc52d974b7bd.zip |
Replace boost by C++11
std::thread doesn't support interruption like boost::thread, which
was used in the ALSA input. Everything else should be equivalent.
Diffstat (limited to 'src/AlsaInput.h')
-rw-r--r-- | src/AlsaInput.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/AlsaInput.h b/src/AlsaInput.h index bd3a800..4f63ab5 100644 --- a/src/AlsaInput.h +++ b/src/AlsaInput.h @@ -21,9 +21,10 @@ #define __ALSA_H_ #include <cstdio> #include <string> +#include <thread> +#include <atomic> #include <alsa/asoundlib.h> -#include <boost/thread/thread.hpp> #include "SampleQueue.h" @@ -107,7 +108,6 @@ class AlsaInputThreaded : public AlsaInput { if (m_running) { m_running = false; - m_thread.interrupt(); m_thread.join(); } } @@ -124,9 +124,9 @@ class AlsaInputThreaded : public AlsaInput void process(); - bool m_fault; - bool m_running; - boost::thread m_thread; + std::atomic<bool> m_fault; + std::atomic<bool> m_running; + std::thread m_thread; SampleQueue<uint8_t>& m_queue; |