summaryrefslogtreecommitdiffstats
path: root/src/AlsaInput.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2014-03-07 10:46:36 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2014-03-07 10:46:36 +0100
commit7284422f3a907724af91de827b2d32220d0d4ba1 (patch)
treedda481445a21bce5f8fad471184e0131038840ef /src/AlsaInput.cpp
parent8d26f0804a03a222ca7b791f40ec51dba3b8162d (diff)
downloadODR-AudioEnc-7284422f3a907724af91de827b2d32220d0d4ba1.tar.gz
ODR-AudioEnc-7284422f3a907724af91de827b2d32220d0d4ba1.tar.bz2
ODR-AudioEnc-7284422f3a907724af91de827b2d32220d0d4ba1.zip
alsa-dabplus compiles
Diffstat (limited to 'src/AlsaInput.cpp')
-rw-r--r--src/AlsaInput.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/AlsaInput.cpp b/src/AlsaInput.cpp
index 4c141a1..fd1feec 100644
--- a/src/AlsaInput.cpp
+++ b/src/AlsaInput.cpp
@@ -18,12 +18,12 @@
*/
#include <cstdio>
-#include <cstdint>
#include <string>
#include <alsa/asoundlib.h>
#include "AlsaInput.h"
+#include <sys/time.h>
using namespace std;
@@ -36,10 +36,10 @@ int AlsaInput::prepare()
const int open_mode = 0; //|= SND_PCM_NONBLOCK;
- if ((err = snd_pcm_open(&m_alsa_handle, alsa_dev,
+ if ((err = snd_pcm_open(&m_alsa_handle, m_alsa_dev.c_str(),
SND_PCM_STREAM_CAPTURE, open_mode)) < 0) {
fprintf (stderr, "cannot open audio device %s (%s)\n",
- alsa_dev, snd_strerror(err));
+ m_alsa_dev.c_str(), snd_strerror(err));
return 1;
}
@@ -121,7 +121,7 @@ size_t AlsaInput::read(uint8_t* buf, snd_pcm_uframes_t length)
return err;
}
-int AlsaInput::start()
+void AlsaInput::start()
{
m_running = true;
m_thread = boost::thread(&AlsaInput::process, this);