diff options
Diffstat (limited to 'toxav/toxav_old.c')
-rw-r--r-- | toxav/toxav_old.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/toxav/toxav_old.c b/toxav/toxav_old.c index e9850973..af9980b0 100644 --- a/toxav/toxav_old.c +++ b/toxav/toxav_old.c | |||
@@ -80,3 +80,32 @@ int toxav_group_send_audio(Tox *tox, uint32_t groupnumber, const int16_t *pcm, u | |||
80 | Messenger *m = *(Messenger **)tox; | 80 | Messenger *m = *(Messenger **)tox; |
81 | return group_send_audio(m->conferences_object, groupnumber, pcm, samples, channels, sample_rate); | 81 | return group_send_audio(m->conferences_object, groupnumber, pcm, samples, channels, sample_rate); |
82 | } | 82 | } |
83 | |||
84 | /* Enable A/V in a groupchat. | ||
85 | * | ||
86 | * return 0 on success. | ||
87 | * return -1 on failure. | ||
88 | * | ||
89 | * Audio data callback format (same as the one for toxav_add_av_groupchat()): | ||
90 | * audio_callback(Tox *tox, uint32_t groupnumber, uint32_t peernumber, const int16_t *pcm, unsigned int samples, uint8_t channels, uint32_t sample_rate, void *userdata) | ||
91 | * | ||
92 | * Note that total size of pcm in bytes is equal to (samples * channels * sizeof(int16_t)). | ||
93 | */ | ||
94 | int toxav_groupchat_enable_av(Tox *tox, uint32_t groupnumber, audio_data_cb *audio_callback, void *userdata) | ||
95 | { | ||
96 | // TODO(iphydf): Don't rely on toxcore internals. | ||
97 | Messenger *m = *(Messenger **)tox; | ||
98 | return groupchat_enable_av(m->log, tox, m->conferences_object, groupnumber, audio_callback, userdata); | ||
99 | } | ||
100 | |||
101 | /* Disable A/V in a groupchat. | ||
102 | * | ||
103 | * return 0 on success. | ||
104 | * return -1 on failure. | ||
105 | */ | ||
106 | int toxav_groupchat_disable_av(Tox *tox, uint32_t groupnumber) | ||
107 | { | ||
108 | // TODO(iphydf): Don't rely on toxcore internals. | ||
109 | Messenger *m = *(Messenger **)tox; | ||
110 | return groupchat_disable_av(m->conferences_object, groupnumber); | ||
111 | } | ||