Questions tagged [avaudioplayernode]

110 questions
0
votes
1 answer

Get a callback from AKPlayer at a user specified time

I’m trying to get a callback at a given point in an AKPlayer’s file playback (currently, just before the end). I see the Apple docs on addBoundaryTimeObserver(), which would work, but it doesn’t seem to be accessible from AKPlayer (I guess an…
jbm
  • 1,248
  • 10
  • 22
0
votes
1 answer

AVAudio and Offline Manual Rendering Mode - can't write buffers of higher frequencies into output file

I'm reading an input file and with the offline manual rendering mode, I want to perform amplitude modulation and to write the result to an output file. For the sake of testing, I produce pure sine waves - this works well for frequencies lower than…
0
votes
1 answer

How many sounds can be played at a time on iOS - AVAudioPlayer vs. AVAudioEngine & AVAudioPlayerNode

I have an application in which there is a set of about 50 sounds, which range in length from about 300 ms to about 4 seconds. Various combinations of sounds need to be played at precise times (up to 10 of them can be triggered at once). Some sounds…
Andromeda
  • 551
  • 1
  • 6
  • 15
0
votes
1 answer

How to add AVAudioUnitVarispeed to a working AVAudioEngine which plays multiple sounds simultaneously

I´m making a music app for iOS. I want to play 5 files simultaneously. This already works with help of this thread: How to play multiple sounds from buffer simultaneously using nodes connected to AVAudioEngine's mixer Now I need to play all the…
0
votes
2 answers

AVAudioengine play / loop audio , multiple buttons

I have this button to play and loop a wav. But what if I have a second button with another loop? I want this second loop to start playing once pressed, however, the first loop must finish his 'round'. And vice versa (play and loop the second loop,…
user1737746
  • 101
  • 10
0
votes
1 answer

Autopan in iOS with AVAudioPlayer smoothly

I am trying to build autopan(move the audio between left, middle and right channel) with AVaudioPlayer to play my music files. I could get it through AVAudioPlayer.pan method. Implemented to get AUTO pan by using timer in my swift code. Now the…
Aleesha
  • 124
  • 2
  • 21
0
votes
1 answer

AVAudioPlayerNode plays multiple songs simultaneously

I am trying to develop a music player app with equaliser. I am using AVAudioEngine and attaching AVAudioPlayerNode but when I change the song the previous song is also playing with the current song. Changing multiple song, plays all the song…
ikcd8
  • 1
  • 2
0
votes
1 answer

Fade out AVAudioEngine AVAudioPlayerNode

I´m trying to fade out an mp3 file using AVAudioEngine and AVAudioPlayerNode. I cannot figure it out. Can anybody please help in Swift? I tried some things already. Everything works quite good but not as smooth as I would like it to be. var…
0
votes
1 answer

how to loop AvAudioPlayerNode in Xcode10

Hi I am making an iOS game in SpriteKit and decided to use an AvAudioPlayerNode and engine instead off the regular AvAudioPlayer so I could change the pitch and playbackspeed but I have come across a problem in which the AvAudioPlayerNode doesn't…
0
votes
1 answer

How to Play Audio Using AVAudioEngine and AVAudioPlayerNode in Swift?

I'm trying to play audio using AVAudioEngine and AVAudioPlayerNode. However, in "engine.connect...", I get this: "PlaySound[21867:535102] [AudioHAL_Client] AudioHardware.cpp:666:AudioObjectGetPropertyData: AudioObjectGetPropertyData: no object with…
jl303
  • 1,461
  • 15
  • 27
0
votes
0 answers

AVAudioPlayerNode keeps repeating sound

I am currently in the process of creating a music application, and will allow the user to change the pitch and speed at which the sound is being played. I am using buttons as the sound initiators, and every time a button is pressed, the…
0
votes
1 answer

Play an audio file using Swift for MacOS

I'm trying to simply play a file (in the main bundle or on the disk) using AVAudioFile, AVAudioEngine and AVAudioPlayerNode. Here is what I'm doing: import Foundation import AppKit import AudioToolbox import AVFoundation struct readFile { …
pm200107
  • 303
  • 1
  • 11
0
votes
0 answers

AVAudioPlayerNode playAt() not synchronized

I have one main AVAudioPlayerNode that plays constantly. And there are other players that are put in the queue and play when the main player reaches a certain point. These AVAudioPlayerNode`s should be synchronized to a millisecond. Sometimes 4-10…
0
votes
1 answer

AVAudioEngine sound recording changes tonality

I have few AVAudioPlayerNodes for each sound user can play. Each player node is connected to its own AVAudioMixerNode to change volume. All of these mixers are connected to one AVAudioMixerNode (I named it soundsMixerNode) which is connected to the…
Valentin Shamardin
  • 3,569
  • 4
  • 34
  • 51
0
votes
0 answers

How to read an AVAudioFile into the same AVAudioPCMBuffer multiple times?

EDIT: I was able to prevent readIntoBuffer from returning false by adding audioFileB.framePosition = 0; at the end of my for loop. However, now it looks like bufferB only contains audio from the final readIntoBuffer call (my incomplete loop). Does…
WongWray
  • 2,414
  • 1
  • 20
  • 25