Post

Replies

Boosts

Views

Activity

Comment on AVAudioEngine Stop Method
One thing that as been confusing for me is that if I am actively transmitting and someone tries to talk (while in full duplex mode) the didActivate audio session doesn't get called so I am able to play audio right after setting the participant, and the behavior is the same as when trying to transmit while something is playing. Am I handling this correctly?
Feb ’25
Comment on AVAudioEngine Stop Method
Two things I have explored to work around this, is setting an active participant when transmission begins, and then after the end scheduling a task 1.5 seconds after the transmission ends to clear the active participant if the reception of audio hasn't begun. The other thing is if I know I was trying to play audio when the didDeactivate method happened, just pausing the engine and the attached players. Then calling play again once that didActivate comes back through.
Feb ’25
Comment on AVAudioEngine Stop Method
From the AVFAudio.AVAudio Engine header file, as in my app I have playing prompt only functionality. As well as two way full duplex voice chat at certain points. " For applications which may need to dynamically switch between output-only and input-output modes, it may be advantageous to use two engine instances. " I am keeping the engine running but from what I have further debugged, it appears the app calls the didDeactivate in the middle of playing and quickly calls the didActivate.
Feb ’25
Comment on AVAudioEngine Stop Method
The gap is variable because it depends on the server but it’s normally about .5-1seconds. Sometimes playback picks up fine, other times it looks like it takes 5-6 seconds for a engine reset to actually happen which then I re link my players and try to play again. I’m using a different engine for output and input as suggested in the docs, so I stop the engine that was no longer in use- but also because there is no guarantee when the server will reply or if it replies at all (poor network, etc…)
Feb ’25
Comment on Handling AVAudioEngine Configuration Change
Here in the documentation this behavior is documented, but what is the correct way to actually determine if this sample got played, or if I need to try to reschedule it when I get the notification that the engine has reset itself in the middle of playback? @param completionHandler called after the buffer has been consumed by the player or has finished playing back or the player is stopped. may be nil. Are you able to provide me a small example of what the process should be?
Jan ’25
Comment on Handling AVAudioEngine Configuration Change
Hi! I am registering for it as below, but this completion is returning even if it didn't actually get played. As I mentioned I am seeing this return when the player it has been scheduled on has been stopped as part of either a route change or the AVAudioEngine it is attached to getting reset (also likely because of the route change) await voicePlayerNode.scheduleBuffer(convertedBuffer, completionCallbackType: .dataPlayedBack)
Jan ’25
Comment on AVAudioEngineConfigurationChange Clearing AVPlayerNode
Thanks for the reply, will give that a try shortly! So just to clarify you suggest instead of changing the entire category, just change the options we provide regarding bluetooth and ad2p? Right now to check the state where I scheduled something on the player but it actually got cancelled- I am just checking after the completion block returns that the player is not in the paused state before actually marking that buffer as played. Is that safe to assume?
Dec ’24
Comment on Push to Talk framework failing state after restart
When you say "Re-initializing our AVAudioSession" does this mean that you manually activated the AudioSession? From what I was understanding the activation and deactivation should only be handled by the PTT Framework which is triggered by setting/clearing an active participant and requests to transmit. For reference I am seeing this same double message situation where the audio session is not active
Oct ’24