Add rate_to_sri()

This commit is contained in:
Andreas Öman 2010-07-01 08:26:16 +00:00
parent 3445a647de
commit 84a595787a
2 changed files with 15 additions and 0 deletions

View file

@ -812,6 +812,7 @@ getmonoclock(void)
}
int sri_to_rate(int sri);
int rate_to_sri(int rate);
extern time_t dispatch_clock;

View file

@ -98,6 +98,20 @@ sri_to_rate(int sri)
}
/**
*
*/
int
rate_to_sri(int rate)
{
int i;
for(i = 0; i < 16; i++)
if(sample_rates[i] == rate)
return i;
return -1;
}
/**
*
*/