avaudioplayer Questions

1

I would like to insert an alarm clock function in an iOS app I am developing, and as a reference, I installed a popular App called "Alarmy." I managed to keep my app running in the background, jus...
Hardie asked 12/1, 2020 at 23:13

13

I have an AVAudioPlayer playing some audio (duh!) The audio is initiated when the user presses a button. When they release it I want the audio to fade out. I am using Interface builder...so I am ...
Noninterference asked 1/8, 2009 at 13:24

2

Solved

Is this the right way to check AVAudioPlayer's current playback time. [audioPlayer play]; float seconds = audioPlayer.currentTime; float seconds = CMTimeGetSeconds(duration); How I can code ...
Welborn asked 1/3, 2012 at 22:41

3

It is easy to create in iOS application. Any one tell me the easy way to create the Sinwave animation while record and play the audio. I was tried soo many ways but I couldn't. Is there any third p...
Wounded asked 16/10, 2015 at 5:8

12

Solved

I am getting mp3 url as a response of an API call. I want to play that audio, so how can I do that? here is my response { content = "En este primer programa se tratar\U00e1n asuntos tan impor...
Conservation asked 2/1, 2016 at 6:37

3

Solved

When I take the duration of an audio file before playing it with: audioPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:url error:&error]; ... [audioPlayer prepareToPlay]; duration = audi...
Raffo asked 26/4, 2013 at 22:21

6

Solved

I want to play a sound even in silent mode in iPhone. Can it be done by using AVAudioPlayer (Without using AVAudioSession) (For ios 3.0+) Thanks in advance.
Camisado asked 25/4, 2012 at 18:56

4

I am developing an iOS app wherein I should be able to record a sound, save it to the filesystem and then play it back from the disk. When I try to play the file off the disk, I could barely hear a...
Whine asked 4/7, 2011 at 5:38

2

Solved

I'm having problems detecting when someone presses up or down volume button. For the moment I just play a file but I want to know when the user presses the button to show an alert when the volume c...
Mezzo asked 9/9, 2016 at 0:51

2

Solved

I made MPNowPlayingInfoCenter but it isn't working. Background playing is working but MPNowPlayingCenter doesn't appear. This is how I made it. import UIKit import AVFoundation import MediaPlayer...
Border asked 11/10, 2019 at 11:16

7

Solved

I have simple AVAudioPlayer in my iphone app, it works, but output should be phone speaker instead of headphone. I found similiar topic here , but don't know how to 'translate' that to swift (Audio...
Lyudmila asked 20/2, 2015 at 14:3

3

i'm trying to play audio file with AVAudioPlayer with this code: let urlString = "http://192.168.1.19:8080/download/2" let url = URL(string: urlString)! print("the url = \(url)") do { let da...
Autoerotic asked 25/1, 2018 at 5:45

3

Solved

I have an AVAudioPlayer stored in a property called "player". When the user clicks a button, it triggers this code: @IBAction func restartPressed(sender: AnyObject) { player.play() } The proble...
Kwa asked 28/1, 2016 at 23:0

1

Solved

I'm playing a sound in my watch only app, but every time the sound plays the debugger shows an error: "MEMixerChannel.cpp:1577 Spatialization not supported on this platform (err=-4)" Anyo...
Immunology asked 24/4, 2022 at 6:41

5

Solved

I'm trying to get multiple sounds files to play on an AVAudioPlayer instance, however when one sound plays, the other stops. I can't get more than one sound to play at a time. Here is my code: im...
Hagai asked 26/4, 2016 at 12:39

0

I'm encountering a couple of console messages/error when using AVAudioPlayer from AVFoundation. The first issue is two messages appearing in the console immediately upon calling the prepareToPlay()...
Pontius asked 26/2, 2022 at 22:11

2

Solved

I am creating a SpriteKit Game with background music looping. The problem is that the music is too loud. How do I lower the volume? Here is the code I used to set up the music var backGroundMusi...
Nuclear asked 19/8, 2014 at 23:35

1

I want to implement an Airplay button that shows the Bluetooth, iPhone option like in the iPhone music app we click on Airplay. I did some of the code but I am facing some issues. As I implement, ...
Merkle asked 4/3, 2021 at 18:49

1

On a screen inside my app I have both an AVAudioPlayer for music and an AVPlayer for videos. The user can swap out different songs and different videos but can only play one at a time. They can pla...
Unmixed asked 4/12, 2021 at 13:4

7

Solved

I'm trying to implement a little function in my app. I am currently playing sounds as AVAudioPlayers and that works fine. What I would like to add is to control the sound's position (currentTime) w...
Digastric asked 16/4, 2010 at 17:6

4

Solved

So I've just noticed that on my iPod Touch, when my app triggers a short wav file to play using AVAudioPlayer, the music gets paused. Is this normal? I can't find any reference to this, and it se...
Pung asked 4/11, 2009 at 9:21

2

I have used NotificationCenter.default.addObserver(self, selector: #selector(volumeChanged(_:)), name: NSNotification.Name(rawValue: "AVSystemController_SystemVolumeDidChangeNotification"...
U asked 18/7, 2021 at 21:30

2

I have a setup as follows, testing on an iPhone 5s with iOS 10.3, both in and out of debug. An AVAudioRecorder fires record(forDuration: 5.0) A CADisplayLink watches the levels of the recorder (t...
Gangboard asked 11/4, 2017 at 16:50

3

Solved

I need to extract audio meter levels from a file so I can render the levels before playing the audio. I know AVAudioPlayer can get this information while playing the audio file through func avera...
Anglia asked 6/8, 2018 at 11:12

2

Solved

I have to merge the audio file and recorded voice.For example the recorded voice is 47seconds. I have to cut or trim the 4minutes audio song to 47seconds. And merge the audio file. var url:NSURL? ...
Depurative asked 16/11, 2016 at 13:55

© 2022 - 2024 — McMap. All rights reserved.