Enable use of lower sample rates for group chats.

This commit is contained in:
irungentoo 2014-11-22 16:40:25 -05:00
parent 6bbb939855
commit 49f4583bc1
No known key found for this signature in database
GPG Key ID: 10349DC9BED89E98
2 changed files with 1 additions and 4 deletions

View File

@ -496,8 +496,7 @@ int group_send_audio(Group_Chats *g_c, int groupnumber, const int16_t *pcm, unsi
if (channels != 1 && channels != 2)
return -1;
//TODO: allow different sample rates
if (sample_rate != 48000)
if (sample_rate != 8000 && sample_rate != 12000 && sample_rate != 16000 && sample_rate != 24000 && sample_rate != 48000)
return -1;
if (!group_av->audio_encoder || group_av->audio_channels != channels || group_av->audio_sample_rate != sample_rate) {

View File

@ -421,8 +421,6 @@ int toxav_join_av_groupchat(Tox *tox, int32_t friendnumber, const uint8_t *data,
* Valid sample rates are 8000, 12000, 16000, 24000, or 48000.
*
* Recommended values are: samples = 960, channels = 1, sample_rate = 48000
*
* TODO: currently the only supported sample rate is 48000.
*/
int toxav_group_send_audio(Tox *tox, int groupnumber, const int16_t *pcm, unsigned int samples, uint8_t channels,
unsigned int sample_rate);