I use openal to record and use openal to play ;
use QT demo to do the communication.
When I put on the Bluetooth headset, as long as I turn on the audio record by BT, the audio playback will be blocked, unable to consume data. And the trumpet is black-color at this time;
But when the trumpet is gray, the record will not block the playback,i can play and record .
It's a random event。
I wonder if there is a program that can detect or change this blocking?
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I use kNewTimePitchParampitch ;
audiounit (in)---convert(pitch shift)---audiounit( out);I can get the result about pitch shift
status =AudioUnitSetParameter(convert, kNewTimePitchParamPitch, kAudioUnitScopeGlobal, 0, pitchShift, 0);
change param:AudioUnitSetParameter(conver, kNewTimePitchParamRate , kAudioUnitScope_Global, 0, pitchShift, 0);
the AudioUnitAddRenderNotify can not get the data which have been change speech. the data is 00.
so how to use the rate change?
I use audiounit (subtype:vpio),to play the audio .
The data is sent to my playback program via netEQ.
The audio sent over the network is relatively uniform,
But the video is jittery.
question:
1 .The audio unit starting time is not fixed,sometimes 250MS,sometimes 400MS (in different iPhone iPad )
2 . the playback callback period not even sometime .such us 8K Sample_rate, Most of times are called (playback callback ) in more than 20 milliseconds.340~342BYTE. but
occasionally, the callback time interval 130+ ms,And ioData->mBuffers[0].mDataByteSize= 340 byte alse. I didn't make the time-consuming operation in the render callback function . Just copy the data to iodata. and data is enough.
PlayCallback(void *inRefCon,
AudioUnitRenderActionFlags *ioActionFlags,
const AudioTimeStamp *inTimeStamp,
UInt32 inBusNumber,
UInt32 inNumberFrames,
AudioBufferList *ioData){copy data from my buffer }
------------------------------------------------------------I want to know what will affect your render callback cycle(period).
I use two audio unit obj (a,b)to do the intercom demo. and unitA to do the record .unitB to do the playback, use the AVAudioSession like this :
[sessionInstance setMode:AVAudioSessionModeDefault error:&error];
[sessionInstance setCategory:AVAudioSessionCategoryPlayAndRecord
withOptions:AVAudioSessionCategoryOptionDefaultToSpeaker|AVAudioSessionCategoryOptionDuckOthers error:&error];
I use kAudioUnitSubTypeVoiceProcessingIO to do the echo cancellation. but When we talk in a quiet room ,the VPIO have echo remain ,at the end of every sentences.
iphone1 talk with iphone2 ,and iphone1 can hear some voice of iphone1, It's not eliminated of iphone2 by the kAudioUnitSubTypeVoiceProcessingIO。
so have any function to change the delay-time when we use VoiceProcessingIO ?