+int eDVBAudio::start()
+{
+ eDebugNoNewLine("AUDIO_PLAY - ");
+ if (::ioctl(m_fd, AUDIO_PLAY) < 0)
+ {
+ eDebug("failed (%m)");
+ return -errno;
+ }
+ eDebug("ok");
+ return 0;
+}
+
+int eDVBAudio::stopPid()
+{
+ eDebugNoNewLine("DEMUX_STOP - audio - ");
+ if (::ioctl(m_fd_demux, DMX_STOP) < 0)
+ {
+ eDebug("failed (%m)");
+ return -errno;
+ }
+ eDebug("ok");
+ return 0;
+}
+
+int eDVBAudio::setAVSync(int val)
+{
+ eDebugNoNewLine("AUDIO_SET_AV_SYNC - ");
+ if (::ioctl(m_fd, AUDIO_SET_AV_SYNC, val) < 0)
+ {
+ eDebug("failed (%m)");
+ return -errno;
+ }
+ eDebug("ok");
+ return 0;
+}
+#else
+int eDVBAudio::startPid(int pid, int type)
+{
+ if ((m_fd < 0) || (m_fd_demux < 0))
+ return -1;
+ dmx_pes_filter_params pes;
+
+ pes.pid = pid;
+ pes.input = DMX_IN_FRONTEND;
+ pes.output = DMX_OUT_DECODER;
+ pes.pes_type = m_dev ? DMX_PES_AUDIO1 : DMX_PES_AUDIO0; /* FIXME */
+ pes.flags = 0;
+ eDebugNoNewLine("DMX_SET_PES_FILTER(0x%02x) - audio - ", pid);
+ if (::ioctl(m_fd_demux, DMX_SET_PES_FILTER, &pes) < 0)
+ {
+ eDebug("failed (%m)");
+ return -errno;
+ }
+ eDebug("ok");
+ eDebugNoNewLine("DEMUX_START - audio - ");
+ if (::ioctl(m_fd_demux, DMX_START) < 0)
+ {
+ eDebug("failed (%m)");
+ return -errno;
+ }
+ eDebug("ok");