diff options
Diffstat (limited to 'toxav/toxav.h')
-rw-r--r-- | toxav/toxav.h | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/toxav/toxav.h b/toxav/toxav.h index 911d6b49..5b25fdeb 100644 --- a/toxav/toxav.h +++ b/toxav/toxav.h | |||
@@ -733,6 +733,10 @@ void toxav_callback_video_receive_frame(ToxAV *av, toxav_video_receive_frame_cb | |||
733 | 733 | ||
734 | /** | 734 | /** |
735 | * NOTE Compatibility with old toxav group calls. TODO(iphydf): remove | 735 | * NOTE Compatibility with old toxav group calls. TODO(iphydf): remove |
736 | * | ||
737 | * TODO(iphydf): Use proper new API guidelines for these. E.g. don't use inline | ||
738 | * function types, don't have per-callback userdata, especially don't have one | ||
739 | * userdata per group. | ||
736 | */ | 740 | */ |
737 | /* Create a new toxav group. | 741 | /* Create a new toxav group. |
738 | * | 742 | * |
@@ -744,9 +748,9 @@ void toxav_callback_video_receive_frame(ToxAV *av, toxav_video_receive_frame_cb | |||
744 | * | 748 | * |
745 | * Note that total size of pcm in bytes is equal to (samples * channels * sizeof(int16_t)). | 749 | * Note that total size of pcm in bytes is equal to (samples * channels * sizeof(int16_t)). |
746 | */ | 750 | */ |
747 | int toxav_add_av_groupchat(Tox *tox, void (*audio_callback)(void *, uint32_t, uint32_t, const int16_t *, unsigned int, | 751 | int toxav_add_av_groupchat(Tox *tox, |
748 | uint8_t, | 752 | void (*audio_callback)(void *, uint32_t, uint32_t, const int16_t *, unsigned int, uint8_t, uint32_t, void *), |
749 | uint32_t, void *), void *userdata); | 753 | void *userdata); |
750 | 754 | ||
751 | /* Join a AV group (you need to have been invited first.) | 755 | /* Join a AV group (you need to have been invited first.) |
752 | * | 756 | * |
@@ -781,4 +785,16 @@ int toxav_group_send_audio(Tox *tox, uint32_t groupnumber, const int16_t *pcm, u | |||
781 | #ifdef __cplusplus | 785 | #ifdef __cplusplus |
782 | } | 786 | } |
783 | #endif | 787 | #endif |
788 | |||
789 | typedef void toxav_group_audio_cb(Tox *tox, uint32_t groupnumber, uint32_t peernumber, const int16_t *pcm, | ||
790 | uint32_t samples, uint8_t channels, uint32_t sample_rate, void *user_data); | ||
791 | |||
792 | typedef TOXAV_ERR_CALL Toxav_Err_Call; | ||
793 | typedef TOXAV_ERR_NEW Toxav_Err_New; | ||
794 | typedef TOXAV_ERR_ANSWER Toxav_Err_Answer; | ||
795 | typedef TOXAV_ERR_CALL_CONTROL Toxav_Err_Call_Control; | ||
796 | typedef TOXAV_ERR_BIT_RATE_SET Toxav_Err_Bit_Rate_Set; | ||
797 | typedef TOXAV_ERR_SEND_FRAME Toxav_Err_Send_Frame; | ||
798 | typedef TOXAV_CALL_CONTROL Toxav_Call_Control; | ||
799 | |||
784 | #endif /* TOXAV_H */ | 800 | #endif /* TOXAV_H */ |