summaryrefslogtreecommitdiffstats
path: root/src/AlsaInput.h
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2015-05-04 11:16:28 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2015-05-04 11:16:59 +0200
commit6ed3918317cb9b20ece88a46daaccc52d974b7bd (patch)
treef95bf412f06260e20c62aa7fa799f42554105283 /src/AlsaInput.h
parent957f67c0a5bf831ff743d03548e515ddc450e8cc (diff)
downloadODR-AudioEnc-6ed3918317cb9b20ece88a46daaccc52d974b7bd.tar.gz
ODR-AudioEnc-6ed3918317cb9b20ece88a46daaccc52d974b7bd.tar.bz2
ODR-AudioEnc-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.h10
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;