@ -506,12 +506,11 @@ void CoreAV::groupCallCallback(void* tox, uint32_t group, uint32_t peer, const i
@@ -506,12 +506,11 @@ void CoreAV::groupCallCallback(void* tox, uint32_t group, uint32_t peer, const i
}
Audio & audio = Audio : : getInstance ( ) ;
if ( ! call . getPeers ( ) [ peer ] ) {
// FIXME: 0 is a valid sourceId, we shouldn't necessarily re-subscribe just because we have 0
audio . subscribeOutput ( call . getPeers ( ) [ peer ] ) ;
if ( ! call . havePeer ( peer ) ) {
call . addPeer ( peer ) ;
}
audio . playAudioBuffer ( call . getPeers ( ) [ peer ] , data , samples , channels , sample_rate ) ;
audio . playAudioBuffer ( call . getAlSource ( peer ) , data , samples , channels , sample_rate ) ;
}
# else
void CoreAV : : groupCallCallback ( void * tox , int group , int peer , const int16_t * data ,
@ -536,9 +535,8 @@ void CoreAV::groupCallCallback(void* tox, int group, int peer, const int16_t* da
@@ -536,9 +535,8 @@ void CoreAV::groupCallCallback(void* tox, int group, int peer, const int16_t* da
}
Audio & audio = Audio : : getInstance ( ) ;
if ( ! call . getPeers ( ) [ peer ] ) {
// FIXME: 0 is a valid sourceId, we shouldn't necessarily re-subscribe just because we have 0
audio . subscribeOutput ( call . getPeers ( ) [ peer ] ) ;
if ( ! call . havePeer ( peer ) ) {
call . addPeer ( peer ) ;
}
audio . playAudioBuffer ( call . getPeers ( ) [ peer ] , data , samples , channels , sample_rate ) ;
@ -556,9 +554,7 @@ void CoreAV::invalidateGroupCallPeerSource(int group, int peer)
@@ -556,9 +554,7 @@ void CoreAV::invalidateGroupCallPeerSource(int group, int peer)
if ( it = = groupCalls . end ( ) ) {
return ;
}
Audio & audio = Audio : : getInstance ( ) ;
audio . unsubscribeOutput ( it - > second . getPeers ( ) [ peer ] ) ;
it - > second . getPeers ( ) [ peer ] = 0 ;
it - > second . removePeer ( peer ) ;
}
/**
@ -752,7 +748,7 @@ bool CoreAV::isCallOutputMuted(const Friend* f) const
@@ -752,7 +748,7 @@ bool CoreAV::isCallOutputMuted(const Friend* f) const
void CoreAV : : invalidateCallSources ( )
{
for ( auto & kv : groupCalls ) {
kv . second . getPeers ( ) . clear ( ) ;
kv . second . clearPeers ( ) ;
}
for ( auto & kv : calls ) {