summaryrefslogtreecommitdiff
path: root/toxav/toxav_old.h
diff options
context:
space:
mode:
Diffstat (limited to 'toxav/toxav_old.h')
-rw-r--r--toxav/toxav_old.h66
1 files changed, 0 insertions, 66 deletions
diff --git a/toxav/toxav_old.h b/toxav/toxav_old.h
deleted file mode 100644
index 89fe3014..00000000
--- a/toxav/toxav_old.h
+++ /dev/null
@@ -1,66 +0,0 @@
1/* toxav_old.h
2 *
3 * Copyright (C) 2013-2015 Tox project All Rights Reserved.
4 *
5 * This file is part of Tox.
6 *
7 * Tox is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * Tox is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with Tox. If not, see <http://www.gnu.org/licenses/>.
19 *
20 */
21/**
22 * This file contains the group chats code for the backwards compatibility.
23 */
24#include "../toxcore/tox.h"
25
26/* Create a new toxav group.
27 *
28 * return group number on success.
29 * return -1 on failure.
30 *
31 * Audio data callback format:
32 * audio_callback(Tox *tox, int groupnumber, int peernumber, const int16_t *pcm, unsigned int samples, uint8_t channels, unsigned int sample_rate, void *userdata)
33 *
34 * Note that total size of pcm in bytes is equal to (samples * channels * sizeof(int16_t)).
35 */
36int toxav_add_av_groupchat(struct Tox *tox, void (*audio_callback)(void*, int, int, const int16_t *, unsigned int, uint8_t,
37 unsigned int, void *), void *userdata);
38
39/* Join a AV group (you need to have been invited first.)
40 *
41 * returns group number on success
42 * returns -1 on failure.
43 *
44 * Audio data callback format (same as the one for toxav_add_av_groupchat()):
45 * audio_callback(Tox *tox, int groupnumber, int peernumber, const int16_t *pcm, unsigned int samples, uint8_t channels, unsigned int sample_rate, void *userdata)
46 *
47 * Note that total size of pcm in bytes is equal to (samples * channels * sizeof(int16_t)).
48 */
49int toxav_join_av_groupchat(struct Tox *tox, int32_t friendnumber, const uint8_t *data, uint16_t length,
50 void (*audio_callback)(void*, int, int, const int16_t *, unsigned int, uint8_t, unsigned int, void *), void *userdata);
51
52/* Send audio to the group chat.
53 *
54 * return 0 on success.
55 * return -1 on failure.
56 *
57 * Note that total size of pcm in bytes is equal to (samples * channels * sizeof(int16_t)).
58 *
59 * Valid number of samples are ((sample rate) * (audio length (Valid ones are: 2.5, 5, 10, 20, 40 or 60 ms)) / 1000)
60 * Valid number of channels are 1 or 2.
61 * Valid sample rates are 8000, 12000, 16000, 24000, or 48000.
62 *
63 * Recommended values are: samples = 960, channels = 1, sample_rate = 48000
64 */
65int toxav_group_send_audio(struct Tox *tox, int groupnumber, const int16_t *pcm, unsigned int samples, uint8_t channels,
66 unsigned int sample_rate); \ No newline at end of file