]> git.proxmox.com Git - qemu.git/blobdiff - audio/audio.h
hw/i386/Makefile.obj: use $(PYTHON) to run .py scripts consistently
[qemu.git] / audio / audio.h
index 3fb2c8bbec9862319bcac654cbcafe833ca4e102..e7ea39777e1bebb78bf4eb747407a0ddb7351953 100644 (file)
@@ -25,9 +25,9 @@
 #define QEMU_AUDIO_H
 
 #include "config-host.h"
-#include "sys-queue.h"
+#include "qemu/queue.h"
 
-typedef void (*audio_callback_fn_t) (void *opaque, int avail);
+typedef void (*audio_callback_fn) (void *opaque, int avail);
 
 typedef enum {
     AUD_FMT_U8,
@@ -38,7 +38,7 @@ typedef enum {
     AUD_FMT_S32
 } audfmt_e;
 
-#ifdef WORDS_BIGENDIAN
+#ifdef HOST_WORDS_BIGENDIAN
 #define AUDIO_HOST_ENDIANNESS 1
 #else
 #define AUDIO_HOST_ENDIANNESS 0
@@ -70,7 +70,7 @@ struct capture_ops {
 typedef struct CaptureState {
     void *opaque;
     struct capture_ops ops;
-    LIST_ENTRY (CaptureState) entries;
+    QLIST_ENTRY (CaptureState) entries;
 } CaptureState;
 
 typedef struct SWVoiceOut SWVoiceOut;
@@ -79,19 +79,15 @@ typedef struct SWVoiceIn SWVoiceIn;
 
 typedef struct QEMUSoundCard {
     char *name;
-    LIST_ENTRY (QEMUSoundCard) entries;
+    QLIST_ENTRY (QEMUSoundCard) entries;
 } QEMUSoundCard;
 
 typedef struct QEMUAudioTimeStamp {
     uint64_t old_ts;
 } QEMUAudioTimeStamp;
 
-void AUD_vlog (const char *cap, const char *fmt, va_list ap);
-void AUD_log (const char *cap, const char *fmt, ...)
-#ifdef __GNUC__
-    __attribute__ ((__format__ (__printf__, 2, 3)))
-#endif
-    ;
+void AUD_vlog (const char *cap, const char *fmt, va_list ap) GCC_FMT_ATTR(2, 0);
+void AUD_log (const char *cap, const char *fmt, ...) GCC_FMT_ATTR(2, 3);
 
 void AUD_help (void);
 void AUD_register_card (const char *name, QEMUSoundCard *card);
@@ -108,7 +104,7 @@ SWVoiceOut *AUD_open_out (
     SWVoiceOut *sw,
     const char *name,
     void *callback_opaque,
-    audio_callback_fn_t callback_fn,
+    audio_callback_fn callback_fn,
     struct audsettings *settings
     );
 
@@ -129,7 +125,7 @@ SWVoiceIn *AUD_open_in (
     SWVoiceIn *sw,
     const char *name,
     void *callback_opaque,
-    audio_callback_fn_t callback_fn,
+    audio_callback_fn callback_fn,
     struct audsettings *settings
     );
 
@@ -147,9 +143,6 @@ static inline void *advance (void *p, int incr)
     return (d + incr);
 }
 
-uint32_t popcount (uint32_t u);
-uint32_t lsbindex (uint32_t u);
-
 #ifdef __GNUC__
 #define audio_MIN(a, b) ( __extension__ ({      \
     __typeof (a) ta = a;                        \