mirror of
https://github.com/Tha14/toxic.git
synced 2025-07-03 03:36:45 +02:00
Updated with latest core
This commit is contained in:
@ -42,6 +42,10 @@
|
||||
#else
|
||||
#include <AL/al.h>
|
||||
#include <AL/alc.h>
|
||||
/* compatibility with older versions of OpenAL */
|
||||
#ifndef ALC_ALL_DEVICES_SPECIFIER
|
||||
#include <AL/alext.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define _cbend pthread_exit(NULL)
|
||||
@ -96,7 +100,7 @@ void callback_peer_timeout ( void* av, int32_t call_index, void *arg );
|
||||
void callback_media_change ( void* av, int32_t call_index, void *arg );
|
||||
|
||||
int stop_transmission(int call_index);
|
||||
void write_device_callback(ToxAv* av, int32_t call_index, int16_t* data, int size);
|
||||
void write_device_callback(ToxAv* av, int32_t call_index, int16_t* data, int size, void* userdata);
|
||||
|
||||
static void print_err (ToxWindow *self, const char *error_str)
|
||||
{
|
||||
@ -142,7 +146,7 @@ ToxAv *init_audio(ToxWindow *self, Tox *tox)
|
||||
toxav_register_callstate_callback(ASettins.av, callback_peer_timeout, av_OnPeerTimeout, self);
|
||||
toxav_register_callstate_callback(ASettins.av, callback_media_change, av_OnMediaChange, self);
|
||||
|
||||
toxav_register_audio_recv_callback(ASettins.av, write_device_callback);
|
||||
toxav_register_audio_recv_callback(ASettins.av, write_device_callback, NULL);
|
||||
|
||||
return ASettins.av;
|
||||
}
|
||||
@ -171,8 +175,9 @@ void read_device_callback (const int16_t* captured, uint32_t size, void* data)
|
||||
}
|
||||
|
||||
|
||||
void write_device_callback(ToxAv* av, int32_t call_index, int16_t* data, int size)
|
||||
void write_device_callback(ToxAv* av, int32_t call_index, int16_t* data, int size, void* userdata)
|
||||
{
|
||||
(void)userdata;
|
||||
if (call_index >= 0 && ASettins.calls[call_index].ttas) {
|
||||
ToxAvCSettings csettings = ASettins.cs;
|
||||
toxav_get_peer_csettings(av, call_index, 0, &csettings);
|
||||
@ -575,7 +580,7 @@ on_error:
|
||||
print_err (self, error_str);
|
||||
}
|
||||
|
||||
void cmd_ccur_device(WINDOW * window, ToxWindow * self, Tox *m, int argc, char (*argv)[MAX_STR_SIZE])
|
||||
void cmd_ccur_device(WINDOW *window, ToxWindow *self, Tox *m, int argc, char (*argv)[MAX_STR_SIZE])
|
||||
{
|
||||
const char *msg;
|
||||
const char *error_str;
|
||||
@ -650,7 +655,7 @@ void cmd_ccur_device(WINDOW * window, ToxWindow * self, Tox *m, int argc, char (
|
||||
print_err (self, error_str);
|
||||
}
|
||||
|
||||
void cmd_mute(WINDOW * window, ToxWindow * self, Tox *m, int argc, char (*argv)[MAX_STR_SIZE])
|
||||
void cmd_mute(WINDOW *window, ToxWindow *self, Tox *m, int argc, char (*argv)[MAX_STR_SIZE])
|
||||
{
|
||||
const char *msg;
|
||||
const char *error_str;
|
||||
@ -698,7 +703,7 @@ void cmd_mute(WINDOW * window, ToxWindow * self, Tox *m, int argc, char (*argv)[
|
||||
print_err (self, error_str);
|
||||
}
|
||||
|
||||
void cmd_sense(WINDOW * window, ToxWindow * self, Tox *m, int argc, char (*argv)[MAX_STR_SIZE])
|
||||
void cmd_sense(WINDOW *window, ToxWindow *self, Tox *m, int argc, char (*argv)[MAX_STR_SIZE])
|
||||
{
|
||||
const char *error_str;
|
||||
|
||||
|
Reference in New Issue
Block a user