1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-07-03 12:16:44 +02:00

Began conversion of audio code to new ToxAV API

This commit is contained in:
cnhenry
2015-06-12 10:50:26 -05:00
parent 6e90072fb8
commit 3241551cfb
17 changed files with 3805 additions and 297 deletions

View File

@ -69,7 +69,7 @@
#ifdef VIDEO
#include "video_call.h"
#endif /* VIDEO */
ToxAv *av;
ToxAV *av;
#endif /* AUDIO */
#ifndef PACKAGE_DATADIR
@ -841,14 +841,14 @@ void *thread_cqueue(void *data)
#ifdef AUDIO
void *thread_audio(void *data)
{
ToxAv *av = (ToxAv *) data;
ToxAV *av = (ToxAV *) data;
while (true) {
pthread_mutex_lock(&Winthread.lock);
toxav_do(av);
toxav_iterate(av);
pthread_mutex_unlock(&Winthread.lock);
usleep(toxav_do_interval(av) * 1000);
usleep(2 * 1000);
}
}
#endif /* AUDIO */
@ -1140,10 +1140,10 @@ int main(int argc, char *argv[])
av = init_audio(prompt, m);
#ifdef VIDEO
av = init_video(prompt, m, av);
#endif /* VIDEO*/
//#ifdef VIDEO
// av = init_video(prompt, m, av);
//
//#endif /* VIDEO*/
/* audio thread */
if (pthread_create(&audio_thread.tid, NULL, thread_audio, (void *) av) != 0)