]> Git Repo - qemu.git/blobdiff - audio/audio.h
hw/s390x: Include the tod-qemu also for builds with --disable-tcg
[qemu.git] / audio / audio.h
index fda2af342412314023fdd14369a2445e8f6616a7..f4339a185e4e5116ba3b88183ef2f97646b2f5a5 100644 (file)
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  * THE SOFTWARE.
  */
+
 #ifndef QEMU_AUDIO_H
 #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,
@@ -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;                        \
@@ -170,4 +163,12 @@ uint32_t lsbindex (uint32_t u);
 int wav_start_capture (CaptureState *s, const char *path, int freq,
                        int bits, int nchannels);
 
-#endif  /* audio.h */
+bool audio_is_cleaning_up(void);
+void audio_cleanup(void);
+
+void audio_sample_to_uint64(void *samples, int pos,
+                            uint64_t *left, uint64_t *right);
+void audio_sample_from_uint64(void *samples, int pos,
+                            uint64_t left, uint64_t right);
+
+#endif /* QEMU_AUDIO_H */
This page took 0.025774 seconds and 4 git commands to generate.