Issue with AVPlayer any PJSIP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Anyone is seeing similar issues?  any advice I am not sure where to start debugging this issue

Thanks is advance..

From: Ashraf Jaddo 
Sent: Thursday, February 16, 2012 4:01 PM
To: pjsip list 
Subject: Issue with AVPlayer any PJSIP

Hello all,
I am using AVAudioPlayer to play a sound in a loop when i get an incoming call from pjsip. I noticed that when I deploy a fresh copy of my code to a device i hear the volume high and clear every time i call the device.. but at the moment i answer a call and let PJSIP does it thing to connect the phone speaker ...etc, i noticed that every time i call after this point the volume from AVAudioPlayer goes down, to summarize:

- Start the App for the first time.

- Call the device.

- My app will ring and volume will be ok.

- Do not answer and hangup.

- Try to call again.

- My app will ring and volume will be ok.

- Do not answer again and hangup.

- If i kept doing this i will see no problem and my AVAudioPlayer will play my ring tone loud and clear.

- Now call the device again and answer.

- The call will be connected with no problem. hangup now.

- Try to call at this point. the AVAudioPlayer will play the sound really low at this point !!any ideas?? 

I think PJSIP is doing something when i connect a call.. the way i am starting PJSIP is similar to the PJSUA examples and i am defaulting most of the configs..

I am using this code to play the ring tone in my ViewController that i show when i get an incoming call notification from PJSIP: 

NSURL* musicFile = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"ring" ofType:@"caf" inDirectory:@"SystemSounds"]]; 

audioPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:musicFile error:nil]; 

// audioPlayer is defined in my view controller *.h 

audioPlayer.numberOfLoops = -1; 

audioPlayer.volume = 1.0; 

[audioPlayer play]; 

I really appreciate any help..

AsH


--------------------------------------------------------------------------------
_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip at lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20120220/c9ab8789/attachment.html>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux