Commit ab2533e5 authored by Simon Morlat's avatar Simon Morlat

fix make distcheck

parent a964bf24
......@@ -121,9 +121,10 @@ struct _MSSndCardDesc{
*/
typedef struct _MSSndCardDesc MSSndCardDesc;
#define MS_SND_CARD_CAP_DISABLED (0)
#define MS_SND_CARD_CAP_CAPTURE (1)
#define MS_SND_CARD_CAP_PLAYBACK (1<<1)
#define MS_SND_CARD_CAP_DISABLED (0) /**<This soundcard is disabled.*/
#define MS_SND_CARD_CAP_CAPTURE (1) /**<This sound card can capture sound */
#define MS_SND_CARD_CAP_PLAYBACK (1<<1) /**<This sound card can playback sound */
#define MS_SND_CARD_HAS_BUILTIN_ECHO_CANCELLER (1<<2) /**<This sound card has built-in echo cancellation*/
struct _MSSndCard{
MSSndCardDesc *desc;
......@@ -132,6 +133,7 @@ struct _MSSndCard{
unsigned int capabilities;
void *data;
int preferred_sample_rate;
int latency;
};
/**
......@@ -233,6 +235,7 @@ MS2_PUBLIC void ms_snd_card_manager_register_desc(MSSndCardManager *m, MSSndCard
**/
MS2_PUBLIC void ms_snd_card_manager_reload(MSSndCardManager *m);
/** @} */
/**
......@@ -333,6 +336,7 @@ MS2_PUBLIC const char *ms_snd_card_get_string_id(MSSndCard *obj);
* MS_SND_CARD_CAP_CAPTURE
* MS_SND_CARD_CAP_PLAYBACK
* MS_SND_CARD_CAP_CAPTURE|MS_SND_CARD_CAP_PLAYBACK
* MS_SND_CARD_HAS_BUILTIN_ECHO_CANCELLER
* </PRE>
*
* @param obj A sound card object.
......@@ -341,6 +345,15 @@ MS2_PUBLIC const char *ms_snd_card_get_string_id(MSSndCard *obj);
*/
MS2_PUBLIC unsigned int ms_snd_card_get_capabilities(const MSSndCard *obj);
/**
* Returns the sound card minimal latency (playback+record), in milliseconds.
* This value is to be used by the software echo cancellers to know where to search for the echo (optimization).
* Typically, an echo shall not be found before the value returned by this function.
* If this value is not known, then it should return 0.
* @param obj A sound card object.
**/
MS2_PUBLIC int ms_snd_card_get_minimal_latency(MSSndCard *obj);
/**
* Set some mixer level value.
*
......
......@@ -14,7 +14,6 @@ src/audiofilters/macsnd.c
src/audiofilters/msconf.c
src/audiofilters/msfileplayer.c
src/audiofilters/msfilerec.c
src/audiofilters/msfilerec_win.c
src/audiofilters/msiounit.m
src/audiofilters/msresample.c
src/audiofilters/msspeex.c
......
......@@ -136,7 +136,7 @@ MSSndCard * ms_snd_card_new(MSSndCardDesc *desc){
}
MSSndCard * ms_snd_card_new_with_name(MSSndCardDesc *desc,const char* name) {
MSSndCard *obj=(MSSndCard *)ms_new(MSSndCard,1);
MSSndCard *obj=(MSSndCard *)ms_new0(MSSndCard,1);
obj->desc=desc;
obj->name=name?ms_strdup(name):NULL;
obj->data=NULL;
......@@ -159,6 +159,10 @@ unsigned int ms_snd_card_get_capabilities(const MSSndCard *obj){
return obj->capabilities;
}
MS2_PUBLIC int ms_snd_card_get_minimal_latency(MSSndCard *obj){
return obj->latency;
}
const char *ms_snd_card_get_string_id(MSSndCard *obj){
if (obj->id==NULL) obj->id=ms_strdup_printf("%s: %s",obj->desc->driver_type,obj->name);
return obj->id;
......
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