summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dxr3audio-oss.c5
-rw-r--r--dxr3audio-oss.h1
-rw-r--r--dxr3audio.h2
-rw-r--r--dxr3device.c1
4 files changed, 9 insertions, 0 deletions
diff --git a/dxr3audio-oss.c b/dxr3audio-oss.c
index d234307..6b1e2ad 100644
--- a/dxr3audio-oss.c
+++ b/dxr3audio-oss.c
@@ -84,6 +84,11 @@ void cAudioOss::write(uchar* data, size_t size)
}
}
+void cAudioOss::poll(cPoller &poller)
+{
+ poller.Add(fd, true);
+}
+
void cAudioOss::setDigitalAudio(bool on)
{
if (digitalAudio == on) {
diff --git a/dxr3audio-oss.h b/dxr3audio-oss.h
index 998e22a..b8ac01e 100644
--- a/dxr3audio-oss.h
+++ b/dxr3audio-oss.h
@@ -32,6 +32,7 @@ public:
virtual void releaseDevice();
virtual void setup(const SampleContext& ctx);
virtual void write(uchar* data, size_t size);
+ virtual void poll(cPoller &poller);
virtual void setDigitalAudio(bool on);
private:
diff --git a/dxr3audio.h b/dxr3audio.h
index 243460c..d0617f7 100644
--- a/dxr3audio.h
+++ b/dxr3audio.h
@@ -39,6 +39,8 @@ public:
virtual void setup(const SampleContext& ctx) = 0;
virtual void write(uchar* data, size_t size) = 0;
+ virtual void poll(cPoller &poller) { (void)poller; }
+
void setEnabled(bool on) { dsyslog("audio enable %d", (int)on); enabled = on; }
void setVolume(int v) { vol = v; }
void mute() { setVolume(0); }
diff --git a/dxr3device.c b/dxr3device.c
index e48ca72..7b3f754 100644
--- a/dxr3device.c
+++ b/dxr3device.c
@@ -202,6 +202,7 @@ void cDxr3Device::StillPicture(const uchar *Data, int Length)
bool cDxr3Device::Poll(cPoller &Poller, int TimeoutMs)
{
Poller.Add(fdVideo, true);
+ audioOut->poll(Poller);
return Poller.Poll(TimeoutMs);
}