Questions tagged [avaudioplayernode]
110 questions
23
votes
1 answer
AVAudioPlayerNode lastRenderTime
I use multiple AVAudioPlayerNode in AVAudioEngine to mix audio files for playback.
Once all the setup is done (engine prepared, started, audio file segments scheduled), I'm calling play() method on each player node to start playback.
Because it…

Vince
- 525
- 1
- 3
- 19
23
votes
2 answers
Using sound effects with AudioEngine
Background - I saw a video titled "AVAudioEngine in Practice" from the following list of videos published at Apple's recent WWDC to apply sound effects to an audio.
https://developer.apple.com/videos/wwdc/2014/
After that, I was successfully able to…

user1205193
- 231
- 1
- 2
- 4
12
votes
3 answers
Using AVAudioEngine to schedule sounds for low-latency metronome
I am creating a metronome as part of a larger app and I have a few very short wav files to use as the individual sounds. I would like to use AVAudioEngine because NSTimer has significant latency problems and Core Audio seems rather daunting to…

blwinters
- 1,911
- 19
- 40
12
votes
5 answers
how to play sound with AVAudioPCMBuffer
I Cannot play sound with AVAudioPCMBuffer (though I could play with AVAudioFile).
I got this error.
ERROR:
AVAudioBuffer.mm:169: -[AVAudioPCMBuffer initWithPCMFormat:frameCapacity:]: required condition is false: isCommonFormat
here is my code below,…

Bick
- 743
- 2
- 8
- 18
10
votes
1 answer
Build a simple Equalizer
I would like to make a 5-band audio equalizer (60Hz, 230Hz, 910Hz, 4kHz, 14kHz) using AVAudioEngine. I would like to have the user input gain per band through a vertical slider and accordingly adjust the audio that is playing. I tried using…

Kevin Rajan
- 827
- 8
- 28
8
votes
6 answers
Saving Audio After Effect in iOS
i am developing an applicatoin so that people can record and change their voices thru app and share it . Basically i so many things and now its time to ask you to help . Here is my play function which plays recorded audio file and adds effects on it…

Kaan Baris Bayrak
- 3,213
- 3
- 16
- 20
7
votes
1 answer
AVAudioEngine inputNode's format changes when playing an AVAudioPlayerNode
I'll start with a simple "playground" view controller class I've made that demonstrates my problem:
class AudioEnginePlaygroundViewController: UIViewController {
private var audioEngine: AVAudioEngine!
private var micTapped = false
…

WongWray
- 2,414
- 1
- 20
- 25
6
votes
1 answer
AVAudioPlayerNode doesn't play sound
I'm trying to generate sound with code below. Everthing is fine there is no error. But when I executed this code, there is no sound. How can I fix this problem ?
By the way, I'm using this example :…

BadCode
- 131
- 13
6
votes
2 answers
SWIFT - Is it possible to save audio from AVAudioEngine, or from AudioPlayerNode? If yes, how?
I've been looking around Swift documentation to save an audio output from AVAudioEngine but I couldn't find any useful tip.
Any suggestion?
Solution
I found a way around thanks to matt's answer.
Here a sample code of how to save an audio after…

mlk
- 388
- 2
- 10
6
votes
6 answers
How to display song currenttime and duration by using AVAudioPlayerNode
I'm making an audio player using AVAudioPlayerNode and playing a song with some effect (delay, pitch change, rate change etc) works, but I'm stuck on displaying song current time and duration.
AVAudioPlayerNode seems not have like…

Bick
- 743
- 2
- 8
- 18
5
votes
0 answers
When playing a segment with AVAudioPlayerNode can I register for two different callbacks, Scheduling Complete AND Playback Complete?
I am building a multitrack audio player in Swift using AVAudioPlayerNode. When scheduling an audio segment for playback, I want to be notified when the scheduling is complete AND when/if file playback finishes. The way the Swift API is written it…

dmann200
- 529
- 4
- 11
5
votes
1 answer
How to play multiple sounds from buffer simultaneously using nodes connected to AVAudioEngine's mixer
I am making a basic music app for iOS, where pressing notes causes the corresponding sound to play. I am trying to get multiple sounds stored in buffers to play simultaneously with minimal latency. However, I can only get one sound to play at any…

Squeakychu
- 161
- 7
5
votes
2 answers
AVAudioEngine synchronization for MIDI playback and recording
Question 1
My first question concerns playback synchronization when using an AVAudioPlayerNode and an AVAudioSequencer for MIDI. Basically I'm trying to play something over MIDI, but they need to be perfectly synchronized.
I'm aware there are sync…

funct7
- 3,407
- 2
- 27
- 33
5
votes
2 answers
How to play sound to a specific output channel on a USB audio interface?
I've got a motu UltraLite mk4 USB audio interface attached to a Mac running MacOS 10.13.3.
I'm trying to play three stereo sound files, each to its own stereo speaker.
To start with less complexity, I'm just trying to get the stereo sound of one…

codingChicken
- 191
- 12
5
votes
2 answers
Playing an audio file repeatedly with AVAudioEngine
I'm working on an iOS app with Swift and Xcode 6. What I would like to do is play an audio file using an AVAudioEngine, and until this point everything OK. But how can I play it without stopping, I mean, that when it ends playing it starts…

Guillermo Barreiro
- 1,365
- 1
- 11
- 13