Commit 56d6b70f authored by aymeric's avatar aymeric

Make it return a value in case it's not implemented or it failed.

git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@447 3f6dc0c8-ddfe-455d-9043-3cd528dc4637
parent 7dd3199d
......@@ -91,7 +91,7 @@ typedef void (*MSSndCardUninitFunc)(struct _MSSndCard *obj);
typedef void (*MSSndCardSetLevelFunc)(struct _MSSndCard *obj, MSSndCardMixerElem e, int percent);
typedef void (*MSSndCardSetCaptureFunc)(struct _MSSndCard *obj, MSSndCardCapture e);
typedef int (*MSSndCardGetLevelFunc)(struct _MSSndCard *obj, MSSndCardMixerElem e);
typedef void (*MSSndCardSetControlFunc)(struct _MSSndCard *obj, MSSndCardControlElem e, int val);
typedef int (*MSSndCardSetControlFunc)(struct _MSSndCard *obj, MSSndCardControlElem e, int val);
typedef int (*MSSndCardGetControlFunc)(struct _MSSndCard *obj, MSSndCardControlElem e);
typedef struct _MSFilter * (*MSSndCardCreateReaderFunc)(struct _MSSndCard *obj);
typedef struct _MSFilter * (*MSSndCardCreateWriterFunc)(struct _MSSndCard *obj);
......@@ -392,8 +392,9 @@ void ms_snd_card_set_capture(MSSndCard *obj, MSSndCardCapture c);
* @param e A sound card control object.
* @param percent A value for control.
*
* Returns: 0 if successfull, <0 otherwise.
*/
void ms_snd_card_set_control(MSSndCard *obj, MSSndCardControlElem e, int val);
int ms_snd_card_set_control(MSSndCard *obj, MSSndCardControlElem e, int val);
/**
* Get some mixer control.
......
......@@ -174,11 +174,14 @@ void ms_snd_card_set_capture(MSSndCard *obj, MSSndCardCapture c){
else ms_warning("ms_snd_card_set_capture: unimplemented by %s wrapper",obj->desc->driver_type);
}
void ms_snd_card_set_control(MSSndCard *obj, MSSndCardControlElem e, int val)
int ms_snd_card_set_control(MSSndCard *obj, MSSndCardControlElem e, int val)
{
if (obj->desc->set_control!=NULL)
obj->desc->set_control(obj,e,val);
else ms_warning("ms_snd_card_set_control: unimplemented by %s wrapper",obj->desc->driver_type);
return obj->desc->set_control(obj,e,val);
else {
ms_warning("ms_snd_card_set_control: unimplemented by %s wrapper",obj->desc->driver_type);
return -1;
}
}
int ms_snd_card_get_control(MSSndCard *obj, MSSndCardControlElem e)
......
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