summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEniz Vukovic <eniz_vukovic@hotmail.com>2015-10-12 22:30:55 +0200
committerEniz Vukovic <eniz_vukovic@hotmail.com>2015-10-12 22:30:55 +0200
commitbb67d9b273b534205df2326fca5712b2d0efc4a5 (patch)
tree53eed16fb06f706d6ab9fa3ed34ab183c5477eb7
parente5ddc0af03d2852fbfb723a48e6e99dfbdb63a82 (diff)
Return removed groupchats code
-rw-r--r--toxav/toxav.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/toxav/toxav.h b/toxav/toxav.h
index d558991f..b36debb1 100644
--- a/toxav/toxav.h
+++ b/toxav/toxav.h
@@ -683,6 +683,51 @@ typedef void toxav_video_receive_frame_cb(ToxAV *toxAV, uint32_t friend_number,
683 */ 683 */
684void toxav_callback_video_receive_frame(ToxAV *toxAV, toxav_video_receive_frame_cb *callback, void *user_data); 684void toxav_callback_video_receive_frame(ToxAV *toxAV, toxav_video_receive_frame_cb *callback, void *user_data);
685 685
686/**
687 * NOTE Compatibility with old toxav group calls TODO remove
688 */
689/* Create a new toxav group.
690 *
691 * return group number on success.
692 * return -1 on failure.
693 *
694 * Audio data callback format:
695 * audio_callback(Tox *tox, int groupnumber, int peernumber, const int16_t *pcm, unsigned int samples, uint8_t channels, unsigned int sample_rate, void *userdata)
696 *
697 * Note that total size of pcm in bytes is equal to (samples * channels * sizeof(int16_t)).
698 */
699int toxav_add_av_groupchat(Tox *tox, void (*audio_callback)(void*, int, int, const int16_t *, unsigned int, uint8_t,
700 unsigned int, void *), void *userdata);
701
702/* Join a AV group (you need to have been invited first.)
703 *
704 * returns group number on success
705 * returns -1 on failure.
706 *
707 * Audio data callback format (same as the one for toxav_add_av_groupchat()):
708 * audio_callback(Tox *tox, int groupnumber, int peernumber, const int16_t *pcm, unsigned int samples, uint8_t channels, unsigned int sample_rate, void *userdata)
709 *
710 * Note that total size of pcm in bytes is equal to (samples * channels * sizeof(int16_t)).
711 */
712int toxav_join_av_groupchat(Tox *tox, int32_t friendnumber, const uint8_t *data, uint16_t length,
713 void (*audio_callback)(void*, int, int, const int16_t *, unsigned int, uint8_t, unsigned int, void *), void *userdata);
714
715/* Send audio to the group chat.
716 *
717 * return 0 on success.
718 * return -1 on failure.
719 *
720 * Note that total size of pcm in bytes is equal to (samples * channels * sizeof(int16_t)).
721 *
722 * Valid number of samples are ((sample rate) * (audio length (Valid ones are: 2.5, 5, 10, 20, 40 or 60 ms)) / 1000)
723 * Valid number of channels are 1 or 2.
724 * Valid sample rates are 8000, 12000, 16000, 24000, or 48000.
725 *
726 * Recommended values are: samples = 960, channels = 1, sample_rate = 48000
727 */
728int toxav_group_send_audio(Tox *tox, int groupnumber, const int16_t *pcm, unsigned int samples, uint8_t channels,
729 unsigned int sample_rate);
730
686#ifdef __cplusplus 731#ifdef __cplusplus
687} 732}
688#endif 733#endif