Commit 2a6a3675 authored by Simon Morlat's avatar Simon Morlat
Browse files

add more debug logs

parent e0767632
...@@ -258,7 +258,7 @@ static bool_t check_card_capability(AudioDeviceID id, bool_t is_input, char * de ...@@ -258,7 +258,7 @@ static bool_t check_card_capability(AudioDeviceID id, bool_t is_input, char * de
AudioBufferList *buflist = ms_malloc(slen); AudioBufferList *buflist = ms_malloc(slen);
theAddress.mSelector = kAudioDevicePropertyStreamConfiguration; theAddress.mSelector = kAudioDevicePropertyStreamConfiguration;
err = AudioObjectGetPropertyData(id err = AudioObjectGetPropertyData(id
,&theAddress ,&theAddress
,0 ,0
,NULL ,NULL
...@@ -283,7 +283,7 @@ static bool_t check_card_capability(AudioDeviceID id, bool_t is_input, char * de ...@@ -283,7 +283,7 @@ static bool_t check_card_capability(AudioDeviceID id, bool_t is_input, char * de
slen = sizeof(CFStringRef); slen = sizeof(CFStringRef);
theAddress.mSelector = kAudioDevicePropertyDeviceUID; theAddress.mSelector = kAudioDevicePropertyDeviceUID;
err = AudioObjectGetPropertyData(id err = AudioObjectGetPropertyData(id
,&theAddress ,&theAddress
,0 ,0
,NULL ,NULL
...@@ -296,7 +296,6 @@ static bool_t check_card_capability(AudioDeviceID id, bool_t is_input, char * de ...@@ -296,7 +296,6 @@ static bool_t check_card_capability(AudioDeviceID id, bool_t is_input, char * de
} }
CFStringGetCString(dUID, uidname, name_len,CFStringGetSystemEncoding()); CFStringGetCString(dUID, uidname, name_len,CFStringGetSystemEncoding());
ms_message("CA: devname:%s uidname:%s", devname, uidname); ms_message("CA: devname:%s uidname:%s", devname, uidname);
return ret; return ret;
} }
......
...@@ -103,9 +103,16 @@ void ms_snd_card_set_manager(MSSndCardManager*m, MSSndCard *c){ ...@@ -103,9 +103,16 @@ void ms_snd_card_set_manager(MSSndCardManager*m, MSSndCard *c){
if (c->sndcardmanager == NULL) c->sndcardmanager = m; if (c->sndcardmanager == NULL) c->sndcardmanager = m;
} }
static const char *cap_to_string(unsigned int cap){
if ((cap & MS_SND_CARD_CAP_CAPTURE) && (cap & MS_SND_CARD_CAP_PLAYBACK)) return "capture, playback";
if (cap & MS_SND_CARD_CAP_CAPTURE) return "capture";
if (cap & MS_SND_CARD_CAP_PLAYBACK) return "playback";
return "none";
}
void ms_snd_card_manager_add_card(MSSndCardManager *m, MSSndCard *c){ void ms_snd_card_manager_add_card(MSSndCardManager *m, MSSndCard *c){
ms_snd_card_set_manager(m,c); ms_snd_card_set_manager(m,c);
ms_message("Card '%s' added",ms_snd_card_get_string_id(c)); ms_message("Card '%s' added with capabilities [%s]",ms_snd_card_get_string_id(c), cap_to_string(c->capabilities));
m->cards=ms_list_append(m->cards,c); m->cards=ms_list_append(m->cards,c);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment