21 |
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
22 |
* THE SOFTWARE. |
* THE SOFTWARE. |
23 |
*/ |
*/ |
|
|
|
|
/* Temporary kludge */ |
|
|
#if defined __linux__ || (defined _BSD && !defined __APPLE__) |
|
|
#include <assert.h> |
|
|
#include "vl.h" |
|
|
|
|
24 |
#include <sys/mman.h> |
#include <sys/mman.h> |
25 |
#include <sys/types.h> |
#include <sys/types.h> |
26 |
#include <sys/ioctl.h> |
#include <sys/ioctl.h> |
27 |
#include <sys/soundcard.h> |
#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; |
42 |
|
|
43 |
#define AUDIO_CAP "oss" |
|
44 |
#include "audio/audio.h" |
#define dolog(...) AUD_log ("oss", __VA_ARGS__) |
45 |
#include "audio/ossaudio.h" |
#ifdef DEBUG |
46 |
|
#define ldebug(...) dolog (__VA_ARGS__) |
47 |
|
#else |
48 |
|
#define ldebug(...) |
49 |
|
#endif |
50 |
|
|
51 |
#define QC_OSS_FRAGSIZE "QEMU_OSS_FRAGSIZE" |
#define QC_OSS_FRAGSIZE "QEMU_OSS_FRAGSIZE" |
52 |
#define QC_OSS_NFRAGS "QEMU_OSS_NFRAGS" |
#define QC_OSS_NFRAGS "QEMU_OSS_NFRAGS" |
475 |
INT_MAX, |
INT_MAX, |
476 |
sizeof (OSSVoice) |
sizeof (OSSVoice) |
477 |
}; |
}; |
|
#endif |
|