aboutsummaryrefslogtreecommitdiff
path: root/audio/audio.h
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2006-07-16 18:57:03 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2006-07-16 18:57:03 +0000
commitec36b695b0bd054e673854fd1f02fa83e4bebea2 (patch)
tree413cfd368ce3c08e7866d48ca406ec3fc6638913 /audio/audio.h
parent6330126439a1f08d2a586bb1357622d944a44ec4 (diff)
audio capture to wab files (malc)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2059 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'audio/audio.h')
-rw-r--r--audio/audio.h23
1 files changed, 21 insertions, 2 deletions
diff --git a/audio/audio.h b/audio/audio.h
index 14fa3bce96..c097f391bb 100644
--- a/audio/audio.h
+++ b/audio/audio.h
@@ -49,13 +49,31 @@ typedef struct {
int endianness;
} audsettings_t;
+typedef enum {
+ AUD_CNOTIFY_ENABLE,
+ AUD_CNOTIFY_DISABLE
+} audcnotification_e;
+
struct audio_capture_ops {
- void (*state) (void *opaque, int enabled);
+ void (*notify) (void *opaque, audcnotification_e cmd);
void (*capture) (void *opaque, void *buf, int size);
+ void (*destroy) (void *opaque);
};
+struct capture_ops {
+ void (*info) (void *opaque);
+ void (*destroy) (void *opaque);
+};
+
+typedef struct CaptureState {
+ void *opaque;
+ struct capture_ops ops;
+ LIST_ENTRY (CaptureState) entries;
+} CaptureState;
+
typedef struct AudioState AudioState;
typedef struct SWVoiceOut SWVoiceOut;
+typedef struct CaptureVoiceOut CaptureVoiceOut;
typedef struct SWVoiceIn SWVoiceIn;
typedef struct QEMUSoundCard {
@@ -79,12 +97,13 @@ AudioState *AUD_init (void);
void AUD_help (void);
void AUD_register_card (AudioState *s, const char *name, QEMUSoundCard *card);
void AUD_remove_card (QEMUSoundCard *card);
-int AUD_add_capture (
+CaptureVoiceOut *AUD_add_capture (
AudioState *s,
audsettings_t *as,
struct audio_capture_ops *ops,
void *opaque
);
+void AUD_del_capture (CaptureVoiceOut *cap, void *cb_opaque);
SWVoiceOut *AUD_open_out (
QEMUSoundCard *card,