MythTV master
audioinputoss.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2007 Anand K. Mistry
3 * Copyright (C) 2008 Alan Calvert
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18 * 02110-1301, USA.
19 */
20/* vim: set expandtab tabstop=4 shiftwidth=4: */
21
22#ifndef AUDIOINPUTOSS_H
23#define AUDIOINPUTOSS_H
24
25#include "audioinput.h"
26
28{
29 public:
30 explicit AudioInputOSS(const QString &device);
32
33 bool Open(uint sample_bits, uint sample_rate, uint channels) override; // AudioInput
34 bool IsOpen(void) override // AudioInput
35 { return (m_dspFd > -1); }
36 void Close(void) override; // AudioInput
37
38 bool Start(void) override; // AudioInput
39 bool Stop(void) override; // AudioInput
40
41 int GetBlockSize(void) override; // AudioInput
42 int GetSamples(void *buffer, uint num_bytes) override; // AudioInput
43 int GetNumReadyBytes(void) override; // AudioInput
44
45 private:
46 QByteArray m_deviceName;
47 int m_dspFd {-1};
48};
49#endif /* AUDIOINPUTOSS_H */
int GetBlockSize(void) override
bool Stop(void) override
bool Start(void) override
int GetNumReadyBytes(void) override
void Close(void) override
~AudioInputOSS() override
Definition: audioinputoss.h:31
bool IsOpen(void) override
Definition: audioinputoss.h:34
int GetSamples(void *buffer, uint num_bytes) override
QByteArray m_deviceName
Definition: audioinputoss.h:46
bool Open(uint sample_bits, uint sample_rate, uint channels) override
AudioInputOSS(const QString &device)
unsigned int uint
Definition: freesurround.h:24