forked from enlightenment/enlightenment
e_mixer: add E_MIXER_CHANNEL_IS_MONO capability
SVN revision: 83916
This commit is contained in:
parent
3ea4b1c083
commit
856cbf6aea
|
@ -64,6 +64,11 @@ int e_mod_mixer_channel_mutable(const E_Mixer_Channel_Info *channel)
|
||||||
return ((channel->capabilities & E_MIXER_CHANNEL_CAN_MUTE )!=0);
|
return ((channel->capabilities & E_MIXER_CHANNEL_CAN_MUTE )!=0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int e_mod_mixer_channel_is_mono(const E_Mixer_Channel_Info *channel)
|
||||||
|
{
|
||||||
|
return ((channel->capabilities & E_MIXER_CHANNEL_IS_MONO )!=0);
|
||||||
|
}
|
||||||
|
|
||||||
int e_mod_mixer_channel_has_capture(const E_Mixer_Channel_Info *channel)
|
int e_mod_mixer_channel_has_capture(const E_Mixer_Channel_Info *channel)
|
||||||
{
|
{
|
||||||
return ((channel->capabilities & E_MIXER_CHANNEL_HAS_CAPTURE )!=0);
|
return ((channel->capabilities & E_MIXER_CHANNEL_HAS_CAPTURE )!=0);
|
||||||
|
|
|
@ -15,9 +15,10 @@ typedef struct _E_Mixer_Channel_State
|
||||||
} E_Mixer_Channel_State;
|
} E_Mixer_Channel_State;
|
||||||
|
|
||||||
#define E_MIXER_CHANNEL_CAN_MUTE 0x01
|
#define E_MIXER_CHANNEL_CAN_MUTE 0x01
|
||||||
#define E_MIXER_CHANNEL_HAS_CAPTURE 0x02
|
#define E_MIXER_CHANNEL_IS_MONO 0x02
|
||||||
#define E_MIXER_CHANNEL_HAS_PLAYBACK 0x04
|
#define E_MIXER_CHANNEL_HAS_CAPTURE 0x04
|
||||||
#define E_MIXER_CHANNEL_MASK 0xFE
|
#define E_MIXER_CHANNEL_HAS_PLAYBACK 0x08
|
||||||
|
#define E_MIXER_CHANNEL_MASK 0xFC
|
||||||
|
|
||||||
typedef struct _E_Mixer_Channel_Info
|
typedef struct _E_Mixer_Channel_Info
|
||||||
{
|
{
|
||||||
|
@ -59,6 +60,7 @@ void e_mod_mixer_channel_names_free(Eina_List*);
|
||||||
void e_mod_mixer_card_names_free(Eina_List*);
|
void e_mod_mixer_card_names_free(Eina_List*);
|
||||||
|
|
||||||
int e_mod_mixer_channel_mutable(const E_Mixer_Channel_Info *channel);
|
int e_mod_mixer_channel_mutable(const E_Mixer_Channel_Info *channel);
|
||||||
|
int e_mod_mixer_channel_is_mono(const E_Mixer_Channel_Info *channel);
|
||||||
int e_mod_mixer_channel_has_capture(const E_Mixer_Channel_Info *channel);
|
int e_mod_mixer_channel_has_capture(const E_Mixer_Channel_Info *channel);
|
||||||
int e_mod_mixer_channel_has_playback(const E_Mixer_Channel_Info *channel);
|
int e_mod_mixer_channel_has_playback(const E_Mixer_Channel_Info *channel);
|
||||||
int e_mod_mixer_channel_is_boost(const E_Mixer_Channel_Info *channel);
|
int e_mod_mixer_channel_is_boost(const E_Mixer_Channel_Info *channel);
|
||||||
|
|
|
@ -318,6 +318,9 @@ _mixer_channel_capabilities(snd_mixer_elem_t *elem)
|
||||||
|
|
||||||
if (snd_mixer_selem_has_capture_volume(elem))
|
if (snd_mixer_selem_has_capture_volume(elem))
|
||||||
capabilities |= E_MIXER_CHANNEL_HAS_CAPTURE;
|
capabilities |= E_MIXER_CHANNEL_HAS_CAPTURE;
|
||||||
|
if (snd_mixer_selem_is_playback_mono(elem)==1 ||
|
||||||
|
snd_mixer_selem_is_capture_mono(elem)==1)
|
||||||
|
capabilities |= E_MIXER_CHANNEL_IS_MONO;
|
||||||
if (snd_mixer_selem_has_playback_volume(elem))
|
if (snd_mixer_selem_has_playback_volume(elem))
|
||||||
capabilities |= E_MIXER_CHANNEL_HAS_PLAYBACK;
|
capabilities |= E_MIXER_CHANNEL_HAS_PLAYBACK;
|
||||||
if (snd_mixer_selem_has_playback_switch(elem) ||
|
if (snd_mixer_selem_has_playback_switch(elem) ||
|
||||||
|
|
Loading…
Reference in New Issue