aboutsummaryrefslogtreecommitdiff
path: root/audio/audio_int.h
diff options
context:
space:
mode:
Diffstat (limited to 'audio/audio_int.h')
-rw-r--r--audio/audio_int.h15
1 files changed, 4 insertions, 11 deletions
diff --git a/audio/audio_int.h b/audio/audio_int.h
index 778615c..22a703c 100644
--- a/audio/audio_int.h
+++ b/audio/audio_int.h
@@ -74,7 +74,6 @@ typedef struct HWVoiceOut {
size_t samples;
QLIST_HEAD (sw_out_listhead, SWVoiceOut) sw_head;
QLIST_HEAD (sw_cap_listhead, SWVoiceCap) cap_head;
- int ctl_caps;
struct audio_pcm_ops *pcm_ops;
QLIST_ENTRY (HWVoiceOut) entries;
} HWVoiceOut;
@@ -96,7 +95,6 @@ typedef struct HWVoiceIn {
size_t samples;
QLIST_HEAD (sw_in_listhead, SWVoiceIn) sw_head;
- int ctl_caps;
struct audio_pcm_ops *pcm_ops;
QLIST_ENTRY (HWVoiceIn) entries;
} HWVoiceIn;
@@ -148,7 +146,6 @@ struct audio_driver {
int max_voices_in;
int voice_size_out;
int voice_size_in;
- int ctl_caps;
QLIST_ENTRY(audio_driver) next;
};
@@ -168,14 +165,16 @@ struct audio_pcm_ops {
* size may be smaller
*/
size_t (*put_buffer_out)(HWVoiceOut *hw, void *buf, size_t size);
- int (*ctl_out) (HWVoiceOut *hw, int cmd, ...);
+ void (*enable_out)(HWVoiceOut *hw, bool enable);
+ void (*volume_out)(HWVoiceOut *hw, struct mixeng_volume *vol);
int (*init_in) (HWVoiceIn *hw, audsettings *as, void *drv_opaque);
void (*fini_in) (HWVoiceIn *hw);
size_t (*read) (HWVoiceIn *hw, void *buf, size_t size);
void *(*get_buffer_in)(HWVoiceIn *hw, size_t *size);
void (*put_buffer_in)(HWVoiceIn *hw, void *buf, size_t size);
- int (*ctl_in) (HWVoiceIn *hw, int cmd, ...);
+ void (*enable_in)(HWVoiceIn *hw, bool enable);
+ void (*volume_in)(HWVoiceIn *hw, struct mixeng_volume *vol);
};
void *audio_generic_get_buffer_in(HWVoiceIn *hw, size_t *size);
@@ -251,12 +250,6 @@ void audio_rate_start(RateCtl *rate);
size_t audio_rate_get_bytes(struct audio_pcm_info *info, RateCtl *rate,
size_t bytes_avail);
-#define VOICE_ENABLE 1
-#define VOICE_DISABLE 2
-#define VOICE_VOLUME 3
-
-#define VOICE_VOLUME_CAP (1 << VOICE_VOLUME)
-
static inline size_t audio_ring_dist(size_t dst, size_t src, size_t len)
{
return (dst >= src) ? (dst - src) : (len - src + dst);