Revision fb065187 audio/ossaudio.c
b/audio/ossaudio.c | ||
---|---|---|
21 | 21 |
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
22 | 22 |
* THE SOFTWARE. |
23 | 23 |
*/ |
24 |
|
|
25 |
/* Temporary kludge */ |
|
26 |
#if defined __linux__ || (defined _BSD && !defined __APPLE__) |
|
27 |
#include <assert.h> |
|
28 |
#include "vl.h" |
|
29 |
|
|
30 | 24 |
#include <sys/mman.h> |
31 | 25 |
#include <sys/types.h> |
32 | 26 |
#include <sys/ioctl.h> |
33 | 27 |
#include <sys/soundcard.h> |
28 |
#include <assert.h> |
|
29 |
#include "vl.h" |
|
30 |
|
|
31 |
#include "audio/audio_int.h" |
|
32 |
|
|
33 |
typedef struct OSSVoice { |
|
34 |
HWVoice hw; |
|
35 |
void *pcm_buf; |
|
36 |
int fd; |
|
37 |
int nfrags; |
|
38 |
int fragsize; |
|
39 |
int mmapped; |
|
40 |
int old_optr; |
|
41 |
} OSSVoice; |
|
34 | 42 |
|
35 |
#define AUDIO_CAP "oss" |
|
36 |
#include "audio/audio.h" |
|
37 |
#include "audio/ossaudio.h" |
|
43 |
|
|
44 |
#define dolog(...) AUD_log ("oss", __VA_ARGS__) |
|
45 |
#ifdef DEBUG |
|
46 |
#define ldebug(...) dolog (__VA_ARGS__) |
|
47 |
#else |
|
48 |
#define ldebug(...) |
|
49 |
#endif |
|
38 | 50 |
|
39 | 51 |
#define QC_OSS_FRAGSIZE "QEMU_OSS_FRAGSIZE" |
40 | 52 |
#define QC_OSS_NFRAGS "QEMU_OSS_NFRAGS" |
... | ... | |
463 | 475 |
INT_MAX, |
464 | 476 |
sizeof (OSSVoice) |
465 | 477 |
}; |
466 |
#endif |
Also available in: Unified diff