开发版本-developer——01 first commit
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
#import "PAIOUnit.h"
|
||||
#import <AudioUnit/AudioUnit.h>
|
||||
#import "AppDelegate.h"
|
||||
|
||||
#import "P2PCInterface.h"
|
||||
//什么含义
|
||||
#define kOutputBus 0
|
||||
#define kInputBus 1
|
||||
@@ -122,7 +122,8 @@ static OSStatus playbackCallback(void *inRefCon,
|
||||
AudioBufferList *ioData)
|
||||
{
|
||||
BOOL isGetAudioOk = NO;
|
||||
if ([[P2PClient sharedClient]p2pCallState] == P2PCALL_STATUS_READY_P2P)
|
||||
// if ([[P2PClient sharedClient]p2pCallState] == P2PCALL_STATUS_READY_P2P)
|
||||
if ([[GWP2PClient sharedClient] linkStatus] == P2PLinkStatusOK)
|
||||
{
|
||||
isGetAudioOk = fgGetAudioDataToPlay(ioData->mBuffers[0].mData, ioData->mBuffers[0].mDataByteSize );
|
||||
}
|
||||
@@ -366,7 +367,8 @@ static OSStatus playbackCallback(void *inRefCon,
|
||||
}
|
||||
else
|
||||
{
|
||||
if ([[P2PClient sharedClient]p2pCallState] == P2PCALL_STATUS_READY_P2P)
|
||||
// if ([[P2PClient sharedClient]p2pCallState] == P2PCALL_STATUS_READY_P2P)
|
||||
if ([[GWP2PClient sharedClient] linkStatus] == P2PLinkStatusOK)
|
||||
{
|
||||
vFillAudioRawData(bufferList->mBuffers[0].mData, bufferList->mBuffers[0].mDataByteSize);
|
||||
}
|
||||
@@ -475,20 +477,4 @@ static OSStatus playbackCallback(void *inRefCon,
|
||||
AudioSessionSetProperty(kAudioSessionProperty_OverrideAudioRoute, sizeof(UInt32), &audioRoute);
|
||||
}
|
||||
|
||||
-(void)setSpeckState:(BOOL)state{
|
||||
|
||||
if ([[P2PClient sharedClient]p2pCallState] == P2PCALL_STATUS_READY_P2P) {
|
||||
self.silentAudio = state;
|
||||
if(self.callType==P2PCALL_TYPE_MONITOR){
|
||||
if(self.silentAudio){
|
||||
fgSendUserData(5, 0, NULL, 0);
|
||||
}else{
|
||||
fgSendUserData(5, 1, NULL, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user