diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2004-11-09 23:09:44 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2004-11-09 23:09:44 +0000 |
commit | fb065187e4ee9e0d1709b344ec01bb426ff1e43b (patch) | |
tree | ca7bf5ed6f0731429b9f9b6d62f2993583c9bcfb /audio/ossaudio.c | |
parent | bf71c9d9b64a70e56db351c38ff71e5e27d871e7 (diff) |
audio clean up (initial patch by malc)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1131 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'audio/ossaudio.c')
-rw-r--r-- | audio/ossaudio.c | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/audio/ossaudio.c b/audio/ossaudio.c index 9fefaa3a27..6bf8cc40c2 100644 --- a/audio/ossaudio.c +++ b/audio/ossaudio.c @@ -21,20 +21,32 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ - -/* Temporary kludge */ -#if defined __linux__ || (defined _BSD && !defined __APPLE__) -#include <assert.h> -#include "vl.h" - #include <sys/mman.h> #include <sys/types.h> #include <sys/ioctl.h> #include <sys/soundcard.h> +#include <assert.h> +#include "vl.h" + +#include "audio/audio_int.h" + +typedef struct OSSVoice { + HWVoice hw; + void *pcm_buf; + int fd; + int nfrags; + int fragsize; + int mmapped; + int old_optr; +} OSSVoice; -#define AUDIO_CAP "oss" -#include "audio/audio.h" -#include "audio/ossaudio.h" + +#define dolog(...) AUD_log ("oss", __VA_ARGS__) +#ifdef DEBUG +#define ldebug(...) dolog (__VA_ARGS__) +#else +#define ldebug(...) +#endif #define QC_OSS_FRAGSIZE "QEMU_OSS_FRAGSIZE" #define QC_OSS_NFRAGS "QEMU_OSS_NFRAGS" @@ -463,4 +475,3 @@ struct audio_output_driver oss_output_driver = { INT_MAX, sizeof (OSSVoice) }; -#endif |