Questions tagged [avaudioplayernode]
110 questions
1
vote
1 answer
AVAudioPlayerNode scheduleBuffer interruptsAtLoop is interrupting immediately
I have an AVAudioPlayerNode (playerNode) and two AVAudioPCMBuffer (buffer1, buffer2) setup.
I also have a AVAudioTime (futureTime) setup for 10 seconds.
var options: AVAudioPlayerNodeBufferOptions =…

Andrew Sage
- 111
- 2
- 6
1
vote
0 answers
AVAudioPlayerNode change play time when it is playing
I have slider, tap gesture, playerNODE. When I touch somewhere on the slider I take the location of slider with tap gesture. I want to change AVAudioPlayerNode play time. The play time must be the location of slider.
func…

Emrecan Öztürk
- 11
- 4
1
vote
0 answers
iOS : How to apply audio effect on recorded video
I am developing an application which require to apply audio effect on recorded video.
I am recording video using GPUImage library. I can successfully done with it. Now, I need to apply audio effect like Chipmunk, Gorila, Large Room, etc.
I looked…

girish_pro
- 838
- 9
- 18
1
vote
1 answer
I'm trying to change the pitch of the audio but not able to save the effected audio . How to save effected audio in background?
This method filter the audio and change the pitch but not saved anywhere where
-(void)Pitch:(NSNumber*)pitch
{
audioPlayerNode = [AVAudioPlayerNode new];
[self.audioEngine attachNode:audioPlayerNode];
AVAudioUnitTimePitch *timePitchEffect =…

Mitesh Varu
- 246
- 1
- 14
1
vote
0 answers
AVAudioEngine crashes with error !nodeimpl->HasEngineImpl()'
After I play an AVAudioPlayerNode that I've attached to my engine, I detach it (to keep CPU usage down). However, when I reattach that AVAudioPlayerNode to the engine again and attempt to play it (while it is still playing from before), I get a…

vikzilla
- 3,998
- 6
- 36
- 57
1
vote
2 answers
programmatically enabling buttons taking several seconds
I am creating a swift app with AVFoundation and using an AVAudioPlayerNode. I disable the play button while playing and in the completion portion of the player I enable it, but the button stays transparent for over 10 seconds.
The button is useable…
user3665817
0
votes
0 answers
AVAudioPlayerNode skip play with scheduleFile (not scheduleSegment)
I have a situation where I need to schedule multiple files in sequence. I do that by calling scheduleFile multiple times:
let node = AVAudioPlayerNode()
node.scheduleFile(theAudioFile1!, at: nil)
node.scheduleFile(theAudioFile2!, at:…

zak
- 83
- 5
0
votes
1 answer
AVAudioPlayerNode.play() causes crash after backgrounding and foregrounding the app
I'm working on a watchOS app which plays sound using an AVAudioPlayerNode. Whenever I put the app in the background, open it back again and try to play sound, the app crashes with the following message:
Terminating app due to uncaught exception…

Tamás Sengel
- 55,884
- 29
- 169
- 223
0
votes
0 answers
Built a very simple AVAudioEngine music player app. Resuming AVAudioEngine causing lag in the UI especially when resuming some time after pausing
Edit 2: When I don't pause the audio engine and just the player node and then resume the player node, there is no ui lag or anything at all. Smooth playback with no crackling. But I have to pause the audio engine to update the MPRemoteCommandCenter…

SwiftEnthusiast
- 402
- 2
- 10
0
votes
0 answers
Add some delay between audio processing and sound to user
It's hard to explain, but I will try to do it...
Is that possible to add some delay between audio processing and sound from speakers to user?
I'm use the Speech framework to recognise an audio file (using SFSpeechAudioBufferRecognitionRequest and…
0
votes
0 answers
AVAudioPlayerNode jump to a specific time of the audio file
I found similar questions here, here, and here but with none of the answers I have been able to solve the problem. Simply put, the audio does not jump at a specific moment but instead starts from scratch.
func seekTo(time: Double) {
…

LucasC
- 43
- 5
0
votes
1 answer
AVAudioEngine player node excessive delay
I am trying to use AVAudioEngine for listening to mic samples and playing them simultaneously via external speakers or headphones (assuming they are attached to iOS device). I tried the following using AVAudioPlayerNode and it works, but there is…

Deepak Sharma
- 5,577
- 7
- 55
- 131
0
votes
0 answers
AVAudioPlayerNode scheduleBuffer playing some glitchy noise while audio transmission
I am trying to use scheduleBuffer, audio is transmitting also but at receiver end playing with some glitchy sound
private func convertAudioToPCMBuffer(clip: Audio) -> AVAudioPCMBuffer? {
var PCMBuffer = AVAudioPCMBuffer()
guard let…

PPreeti
- 67
- 3
0
votes
2 answers
AVPlayer.addPeriodicTimeObserver equivalent on AVAudioPlayerNode
I'am refactoring a react-native package that using AVPlayer, into AVAudioEngine and AVAudioPlayerNode. But I confuse how to turn AVPlayer.addPeriodicTimeObserver using AVAudioPlayerNode. The idea is i need to get time data when music is playing,…

Iqbal
- 31
- 5
0
votes
1 answer
Swift - How to get the current position of AVAudioPlayerNode while it's looping?
I have an AVAudioPlayerNode looping a segment of a song:
audioPlayer.scheduleBuffer(segment, at: nil, options:.loops)
I want to get current position of the song while it's playing. Usually, this is done by calculating = currentFrame /…

Ziad Halabi
- 964
- 11
- 31