Google Groups

Re: [discuss-webrtc] Re: iPhone build for WebRTC


Richard Speyer Apr 17, 2012 7:05 AM
Posted in group: discuss-webrtc
I'll check it out, thanks Arik. FWIW I flipped the setup to using RemoteIO instead of VoiceProcessingIO and now it initializes successfully. I will certainly go back an analyze this, but for now it's enough to let me work on the rest of my stack for a bit. Thanks for all the pointers.

On Tuesday, April 17, 2012 3:16:42 AM UTC-4, arik wrote:
Zack, 

The best reference is Apple. But I'm not sure you need it.

What I did was to look at the Audio sample used in Android and simply implemented the same steps in my IOS application.

I hope this helps.

Arik

On Tuesday, April 17, 2012 3:30:17 AM UTC+3, Zack Coder wrote:
I'm rather new to working with iOS/Audio Units and my assumption right now is that my app is missing some necessary setup/teardown code which compliments this driver. Is this true? Could someone point me to a good reference if so?

On Monday, April 16, 2012 8:14:59 PM UTC-4, Zack Coder wrote:
Nice catch. I fixed that but am still getting an error on initialization; this time with code 66635

On Monday, April 16, 2012 7:08:43 PM UTC-4, Gustavo wrote:
Your log says 1600 Hz and should be 16000 Hz.  That's probably your problem.

On Mon, Apr 16, 2012 at 11:56 PM, Zack Coder <rz...@cec.wustl.edu> wrote:
> Were there any changes to Gustav's audio driver code required to get things
> running? I have everything building but when I go to instantiate the audio
> device I get:
>
> AURemoteIO::Initialize failed: -308 (enable 3, outf< 1 ch,   1600 Hz, Int16>
> inf< 1 ch,   1600 Hz, Int16>)
>
>
> On Monday, April 16, 2012 9:51:07 AM UTC-4, arik wrote:
>>
>> Gustavo,
>>
>>  Thanks a lot for all these tips. I will put them into the code. BTW, You
>> did a really nice work on the audio driver and it saved me days of work.
>>
>> My next task is to enable the video, which seems to be quite a challenge,
>> I already have it working on Android
>> but there the code was already written and I only faced compile issues.
>>
>> Did you try it already?
>>
>> Regards,
>> Arik
>>
>> On Monday, April 16, 2012 4:12:01 PM UTC+3, Gustavo wrote:
>>>
>>> Does it happen with simulator or only with the real devices?  Have you
>>> tried different codecs?
>>>
>>> I remembered 2 additional tweaks I made to reduce the computational
>>> complexity, but it shouldn't be needed if you are using the simulator
>>> or using G.711.
>>>
>>> In case you want to use iSAC you have to enable iSACfix.
>>>
>>> engine_configuration.h
>>> //#define WEBRTC_CODEC_ISAC       // floating-point iSAC
>>> implementation (default)
>>> #define WEBRTC_CODEC_ISACFX  // fix-point iSAC implementation
>>>
>>> Probably not mandatory but I also changed the sampling rate from 48K
>>> to 16K to remove the necessity of resampling:
>>> voice_engine_defines.h
>>> enum { kVoiceEngineAudioProcessingDeviceSampleRateHz = 16000 };
>>> audio_device_iphone.h
>>> const WebRtc_UWord32 N_REC_SAMPLES_PER_SEC = 16000;
>>> const WebRtc_UWord32 N_PLAY_SAMPLES_PER_SEC = 16000;
>>>
>>> Some day I will make a script to apply all these changes, I promise :-)
>>>
>>> G.
>>>
>>> On Mon, Apr 16, 2012 at 2:55 PM, arik <arik.h...@gmail.com> wrote:
>>> > It's 48000.
>>> >
>>> > BTW, If I only enable receive it works perfect.
>>> > If only transmit then there is delay but no noise.
>>> > Receive+Transmit: Delay & Noise.
>>> >
>>> > Arik
>>> >
>>> >
>>> > On Monday, April 16, 2012 8:43:28 AM UTC-4, Gustavo wrote:
>>> >>
>>> >> Hi Arik,
>>> >>
>>> >> Delay is pretty low for me and don't have any noise problem.
>>> >>
>>> >> Perhaps the noise is because a mistmatch between sampling frequencies
>>> >> in the "driver" and audio processing in mistmatch. What are the values
>>> >> of N_REC_SAMPLES_PER_SEC and N_PLAY_SAMPLES_PERSEC macros in
>>> >> audio_device_iphone.h?
>>> >>
>>> >> Regards,
>>> >>
>>> >> G.
>>> >>
>>> >>
>>> >> On Mon, Apr 16, 2012 at 2:34 PM, mismatch <arik.h...@gmail.com>
>>> >> wrote:
>>> >> >
>>> >> > Thanks for the response. I'm working with a version from a few weeks
>>> >> > ago.
>>> >> >
>>> >> > The STL issue was a compilation bug I had.
>>> >> >
>>> >> > Currently I have WebRTC on iPhone working peer to peer and in
>>> >> > loopback.
>>> >> > The problem is that there is a lot of noise on the line and
>>> >> > the delay is terrible.
>>> >> >
>>> >> > I will be happy if someone can give me tips on how to debug these
>>> >> > issues.
>>> >> >
>>> >> > For a driver I'm using the one Nick Foster pointed to me, the one
>>> >> > Gustav
>>> >> > wrote.
>>> >> >
>>> >> > Arik
>>> >> >
>>> >> >
>>> >> > On Wednesday, April 11, 2012 5:44:48 PM UTC-4, tjgrant wrote:
>>> >> >>
>>> >> >> Arik…
>>> >> >>
>>> >> >> I've not had any issues with STL and iPhone dev…
>>> >> >>
>>> >> >> What kind of errors are you getting?
>>> >> >>
>>> >> >> Also curious, what revision # of WebRTC are you starting with…
>>> >> >> current?
>>> >> >>
>>> >> >> Best,
>>> >> >> --TJ Grant
>>> >> >> tjg...@tatewake.com
>>> >> >>
>>> >> >> On Wed, Apr 11, 2012 at 08:12, arik <arik.h...@gmail.com>
>>> >> >> wrote:
>>> >> >>>
>>> >> >>> Thanks a lot. It's a great help.
>>> >> >>>
>>> >> >>> I'm currently porting all projects to work with XCODE.
>>> >> >>>
>>> >> >>> My last issue is how to solve the STL map references in the code.
>>> >> >>>
>>> >> >>> Is there a way to link with STL support for iPhone native code?
>>> >> >>>
>>> >> >>> Arik
>>> >> >>>
>>> >> >>>
>>> >> >>> On Thursday, April 5, 2012 11:45:40 AM UTC-4, Nick Foster wrote:
>>> >> >>>>
>>> >> >>>> Take a look at what Gustav has already posted to the webrtc
>>> >> >>>> group.
>>> >> >>>>
>>> >> >>>> http://code.google.com/p/webrtc/issues/detail?id=284
>>> >> >>>>
>>> >> >>>> - Nick
>>> >> >>>>
>>> >> >>>> On Thu, Apr 5, 2012 at 5:04 AM, Zack Coder <rz...@cec.wustl.edu>
>>> >> >>>> wrote:
>>> >> >>>>>
>>> >> >>>>> Hi Arik,
>>> >> >>>>>
>>> >> >>>>> I came across this library and think it may be useful for some
>>> >> >>>>> of
>>> >> >>>>> the audio work.
>>> >> >>>>>
>>> >> >>>>> http://alexbw.github.com/novocaine/
>>> >> >>>>>
>>> >> >>>>>
>>> >> >>>>> On Thursday, April 5, 2012 7:43:58 AM UTC-4, arik wrote:
>>> >> >>>>>>
>>> >> >>>>>> Nick, Hello,
>>> >> >>>>>>
>>> >> >>>>>> I have up to now moved all the platform independent audio
>>> >> >>>>>> libraries
>>> >> >>>>>> to iPhone library projects. I'm starting to work on
>>> >> >>>>>> audio_device and
>>> >> >>>>>> system_wrappers.
>>> >> >>>>>>
>>> >> >>>>>> This is the hard part I believe :( I will keep you updated on
>>> >> >>>>>> how I
>>> >> >>>>>> progress.
>>> >> >>>>>>
>>> >> >>>>>> Arik
>>> >> >>>>>>
>>> >> >>>>>> On Monday, April 2, 2012 12:13:58 PM UTC-4, Nick Foster wrote:
>>> >> >>>>>>>
>>> >> >>>>>>> Good luck Arik,
>>> >> >>>>>>>
>>> >> >>>>>>> I am interested in the work you do down this path. I do not
>>> >> >>>>>>> know
>>> >> >>>>>>> enough about the CoreAudio libraries on the iOS to know how to
>>> >> >>>>>>> hook
>>> >> >>>>>>> everything up. But excited for what you can get done.
>>> >> >>>>>>>
>>> >> >>>>>>> - Nick
>>> >> >>>>>>>
>>> >> >>>>>>> On Mon, Apr 2, 2012 at 8:06 AM, arik wrote:
>>> >> >>>>>>>>
>>> >> >>>>>>>> Ok, fixed it. Some issue with my configuration.
>>> >> >>>>>>>>
>>> >> >>>>>>>> Now working on converting the xcode project to iPhone instead
>>> >> >>>>>>>> of
>>> >> >>>>>>>> MAC.
>>> >> >>>>>>>>
>>> >> >>>>>>>> Arik
>>> >> >>>>>>>>
>>> >> >>>>>>>>
>>> >> >>>>>>>> On Monday, April 2, 2012 9:36:24 AM UTC-4, arik wrote:
>>> >> >>>>>>>>>
>>> >> >>>>>>>>> Alex, Hello,
>>> >> >>>>>>>>>
>>> >> >>>>>>>>> I started building for MAC according
>>> >> >>>>>>>>> to: http://www.webrtc.org/reference/getting-started
>>> >> >>>>>>>>>
>>> >> >>>>>>>>> I am hoping to build for MAC first and then use the
>>> >> >>>>>>>>> makefiles to
>>> >> >>>>>>>>> convert the build to iPhone.
>>> >> >>>>>>>>>
>>> >> >>>>>>>>> My problem is that running gclient runhooks --force does not
>>> >> >>>>>>>>> create webrtc.xcodeproj
>>> >> >>>>>>>>>
>>> >> >>>>>>>>> Any idea how I should proceed? Is this the correct path, or
>>> >> >>>>>>>>> do
>>> >> >>>>>>>>> you recommend a different approach?
>>> >> >>>>>>>>>
>>> >> >>>>>>>>> Thanks,
>>> >> >>>>>>>>> Arik Halperin
>>> >> >>>>>>>>>
>>> >> >>>>>>>>>
>>> >> >>>>>>>>> On Saturday, March 24, 2012 12:19:42 PM UTC-4, Alex wrote:
>>> >> >>>>>>>>>>
>>> >> >>>>>>>>>> Hi Arik,
>>> >> >>>>>>>>>>
>>> >> >>>>>>>>>>     I was trying to integrate WebRTC VoiceEngine in PJSIP
>>> >> >>>>>>>>>> (just
>>> >> >>>>>>>>>> to replace PJMEDIA). It is working fine.
>>> >> >>>>>>>>>> If you have any doubts, let me know. If possible, i will
>>> >> >>>>>>>>>> share
>>> >> >>>>>>>>>> my knowledge.
>>> >> >>>>>>>>>>
>>> >> >>>>>>>>>>
>>> >> >>>>>>>>>> --
>>> >> >>>>>>>>>>
>>> >> >>>>>>>>>> Regards,
>>> >> >>>>>>>>>> J Alex Antony Vijay.
>>> >> >>>>>>>>>>
>>> >> >>>>>>>>>>
>>> >> >>>>>>>>>> On Mon, Mar 19, 2012 at 10:53 PM, arik  wrote:
>>> >> >>>>>>>>>>>
>>> >> >>>>>>>>>>> Hello,
>>> >> >>>>>>>>>>>
>>> >> >>>>>>>>>>> Has anyone tried to build WebRTC for iPhone? I will be
>>> >> >>>>>>>>>>> happy
>>> >> >>>>>>>>>>> to share some thoughts about this.
>>> >> >>>>>>>>>>>
>>> >> >>>>>>>>>>> Thanks,
>>> >> >>>>>>>>>>> Arik
>>> >> >>>>>>>>>>
>>> >> >>>>>>>>>>
>>> >> >>>>>>>
>>> >> >>>>
>>> >> >>