• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Strange behavior in audio Session Interruption Listener
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Strange behavior in audio Session Interruption Listener


  • Subject: Re: Strange behavior in audio Session Interruption Listener
  • From: Inca Rose <email@hidden>
  • Date: Mon, 16 Mar 2009 13:57:27 +0200
  • Organization: Incarose Ltd.

Some logs from printf:


Those are the original values after initialization kAudioSessionProperty_CurrentHardwareSampleRate: 8000.00 kAudioSessionProperty_CurrentHardwareInputLatency: 0.02 kAudioSessionProperty_CurrentHardwareIOBufferDuration: 0.00400 kAudioSessionProperty_CurrentHardwareOutputLatency: 0.02


This are the values I get when calling setAudioSEsisonParams from the interrupt callback
( when I get kAudioSessionEndInterruption )
kAudioSessionProperty_CurrentHardwareSampleRate: 8000.00
kAudioSessionProperty_CurrentHardwareInputLatency: 0.02
kAudioSessionProperty_CurrentHardwareIOBufferDuration: 0.12800
kAudioSessionProperty_CurrentHardwareOutputLatency: 0.02


As you can see the difference in CurrentHardwareIOBufferDuration, it returns 0.128 when I asked
for 0.005.


Then I emulate the same sequence from the UI and I get:
kAudioSessionProperty_CurrentHardwareSampleRate: 8000.00
kAudioSessionProperty_CurrentHardwareInputLatency:   0.02
kAudioSessionProperty_CurrentHardwareIOBufferDuration: 0.00400
kAudioSessionProperty_CurrentHardwareOutputLatency:   0.02

It is like I can not change the CurrentHardwareIOBufferDuration duroing the callback.

It is very strange.
Pls help

Thanks
Inca R

Inca Rose wrote:
Hi;
I'm implementing the audioSessionInterruptionListener callback in
my audio session.

I use a remote IO AU to play and record.

I use the following steps to configure the audio session:

1- set parameters
2- Activate Audio Session
3- Create remoteIOAU
4- Configure remoteIOAU
5- Start remoteIOAU

Everything goes well.

An incoming call arrives and my callback gets called.
On interruption I stop the remoteIOAU calling AudioOutputUnitStop on my remoteIOAU


If I ignore the incoming call my callback function get called again.
This time I have to activate my session and start the remoteIOAU again.
those are the steps I take to do so:
1- set parameters
2- Activate Audio Session
3- call AudioOutputUnitStop on  remoteIOAU

I set the exact same parameters to the AudioSesison I set at the beginning ( actually I call the same function )
But this time something goes wrong and I get a different hardware buffer. My settings are to
get a hardware buffer of 0.005 millis that for my setting is equivalent to 32 bytes. For some reason I get 1024 bytes on the callback.


If I emulate ( this time from the UI ) the same sequence:

1- stop remoteIOAU
2- set Audio Session parameters
3- Activate Audio SEssion
4- start remoteIOAU

everything comes to normal, getting again 32 bytes at the remoteIOAU render callback.

For some reason setting the AudioSession parameter at the time I get the callback doesnt do anything.


I'm testing on an ( non 3g ) iPhone device with OS version 2.2.1


Any help ??

Thanks
Inca R
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:


This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Strange behavior in audio Session Interruption Listener
      • From: Greg Chapman <email@hidden>
References: 
 >Strange behavior in audio Session Interruption Listener (From: Inca Rose <email@hidden>)

  • Prev by Date: Renaming a file
  • Next by Date: Bug in SampleUSBDriver/Shared/MIDIParser.cpp
  • Previous by thread: Strange behavior in audio Session Interruption Listener
  • Next by thread: Re: Strange behavior in audio Session Interruption Listener
  • Index(es):
    • Date
    • Thread