Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Filter by
Sorted by
Tagged with
0 votes
1 answer
98 views

iOS AVAudioPlayer audio won't play in background when Spotify is actively playing audio

I'm working on an iOS app that plays a short timer sound (TimerDone.wav) using AVAudioPlayer. The sound plays correctly in these scenarios: When the app is in the foreground. When the app is in the ...
Ishan Patel's user avatar
0 votes
1 answer
217 views

Playing base64 audio chunks in Swift

I'm receiving audio chunks over WebSocket and storing them in an AVAudioPCMBuffer for playback using AVAudioEngine. However, when I start playing the audio, I hear noise instead of the expected sound. ...
yarslvd's user avatar
  • 13
-1 votes
1 answer
135 views

Error when pressing the sound button quickly

I have a volume toggle button. When I press the button, then pause or play is called with some fading. The problem is that if I quickly press the button twice, for example, pause and then playback, I ...
user1342352532's user avatar
0 votes
1 answer
45 views

Audio Recording With Timeout Swift

I'm using AVAudioEngine to record audio in my iOS app. I want to stop the recording automatically if there is no audio input for a specified duration (e.g., 5 seconds). How can I achieve this? Here is ...
Farhandika's user avatar
0 votes
0 answers
42 views

AVAudioEngine: compensate latency between 2 AVAudioMixerNode inputs

Context: I have an AVAudioMixerNode accepting 2 inputs: input A: an AVAudioUnitSampler (triggered by a MIDI track of an AVAudioSequencer); input B: an AVAudioPlayerNode. All nodes are connected to ...
Georges_Abitbol's user avatar
0 votes
1 answer
87 views

Audio tag html doesn't play sound when clicked on IOS

I'm in Blazor server and when I click on my audio tag, it doesn't play any sound. But when I click it on Android or on Windows PC, it works well. This is my code: @if (Question.Parcours.Type == ...
mathdxdx's user avatar
1 vote
1 answer
179 views

NDI Audio playback on iOS simulator is great but iPad is glitchy and stuttery

I am trying to implement an NDI audio receiver on iOS. It sounds great on the iOS simulator but on the iPad (iPad Air 2?) there is some stuttering and glitching. I am pretty sure it has to do with the ...
Seth Haberman's user avatar
1 vote
0 answers
135 views

I want to create an audio waveform view and I want to synchronize it with the audio playback position so I am trying to create an audio editor

fun generateWaveformBitmap(pcmFile: File, width: Int, height: Int): Bitmap { val pcmData = pcmFile.readBytes() val bytesPerSample = 2 // 16-bit PCM data val samples = pcmData.size / ...
Kizito Okparanwankwo's user avatar
1 vote
2 answers
197 views

How to compress AVAudioPCMBuffer to Data for streaming and playback the compressed Data

I am trying to record my microphone, compress the recorded audio buffer, transfer the compressed buffer as bytes to another device, decompress the received bytes into a new buffer and finally playback ...
jasper aelvoet's user avatar
1 vote
0 answers
260 views

Swift: Not playing user recorded audio - OSStatus Error 1685348671

I'm working on an iOS application using Swift where I need to play user created audio files. However when it comes to loading the file, I'm encountering an issue when trying to initialize ...
nellyJustNelly's user avatar
1 vote
1 answer
91 views

Implement a preview button within SwiftUI Picker

I would like to create a Picker within my app's settings which allows the user to select their notification tone. Specifically, I want the user to be able to preview this tone before selecting it. My ...
Zack A's user avatar
  • 45
0 votes
0 answers
523 views

skip forward and backward 10 seconds html Audio, JavaScript function not working on Opera And Chrome

I ran into an issue with a project that I'm currently working on, I made a function to skip forward and backward 10 seconds like on YouTube for an html audio player, on browsers like Firefox, Safari ...
Oliver Gray Silva's user avatar
0 votes
0 answers
50 views

NSInvalidArgumentException, in Swift?

I'm trying to play an audio(mp3) that is uploaded to Firebase. This AudioManager class caused an error at player = try AVAudioPlayer(contentsOf: url) when I called the playAudio() function. class ...
Zin Win Htet's user avatar
  • 2,585
1 vote
1 answer
122 views

How to load/play an AAC audio discarding bytes from start of file (junk bytes header) using AVAudioFile + AVAudioPlayerNode (swift)

I have a large file containing several aac audios, in sort of "blocks" (each audio separated by some junk bytes). I need to load each file separately (using start/offset bytes to pick each ...
Gilian's user avatar
  • 460
1 vote
0 answers
126 views

Synchronizing multiple AVAudioPlayerNodes using lastRenderTime right after starting engine

I'm trying to perfectly synchronize the playback of 2 AVAudioPlayerNode using AVAudioEngine. I can achieve this if the engine in running, because then I can use one of the player's lastRenderTime. ...
Miles's user avatar
  • 574
1 vote
1 answer
546 views

AvAudioEngine not restarted after interruption

I am getting audio from mic. with using AvAudioEngine but when coming call and makes interruption, I want to stop and then restart getting audio process but When I try handleInterruption(I shared ...
ridvan's user avatar
  • 753
0 votes
1 answer
80 views

can't sending buffer audio data using GCDAsyncUdpSocket from iOS version 17.2 AvAudioEngine in Swift

When I send data from 17.3 phone and listen receiving socket data I can't see any data but When I send data from 15.3 phone and listen data I can see receiving data, I think problem is ...
ridvan's user avatar
  • 753
0 votes
2 answers
488 views

How to play/pause sound when button is pressed

I need to play sound (it's in Assets) when I press the button. I got error: "Audio file could not be found" I got this class: import SwiftUI import AVFoundation class AudioPlayerViewModel: ...
Filip Pokłosiewicz's user avatar
2 votes
0 answers
658 views

How to i create audio waveform like messenger and WhatsApp, suggest me some packages. I want to customize it as i want

I create audio waveform like messenger and WhatsApp. when I sent any recorded voice it should be looking similer to the messenger or WhatsApp. I already tried react-native-audiowaveform this package ...
Shuvajit Maitra's user avatar
0 votes
1 answer
194 views

AVAudioPlayer Play fails after returning to the app from Locked state or just app sleeping for some time

I need to play a lot of short sounds quickly and using a separate AVAudioPlayer for each sound. I am using here C# because I use .Net MAUI but it doesn't matter. Everything works like on native iOS. ...
Vorotnyak_Nazar's user avatar
1 vote
1 answer
999 views

avoid background noise and audio echo in AvAudioEngine Swift

I am trying to send audio with using AudioEngine (getting over iPhone microphone) to another listening device via GCDAsyncUdpSocket, and I get audio in another ios device and I can listen auido in ...
ridvan's user avatar
  • 753
3 votes
0 answers
1k views

How can i implement React Native Track Player on Expo?

Is there a guide to follow to implement React Native Track Player on Expo. I've tried and tried but it keeps giving the error cannot read property capability of null trackplayer I made a little ...
user3118363's user avatar
2 votes
2 answers
516 views

How to create a simple EQ like AVAudioUnitEQ in AudioKit?

I'm attempting to transition my audio project to utilize AudioKit. In my current setup, I employ a standard Apple node for equalization. Here's a snippet to provide context: var engine = AVAudioEngine(...
KAMIKAZE's user avatar
  • 530
7 votes
1 answer
1k views

AVAudioEngine & AVAudioPlayer. setVoiceProcessingEnabled low volume output

As the title suggests I am using AVAudioEngine for SFSpeechRecognition input & AVAudioPlayer for sound output. Apple says in this talk that the setVoiceProcessingEnabled function very usefully ...
sleep9's user avatar
  • 71
0 votes
1 answer
554 views

MPNowPlayingInfo only displaying after changing playback state (SwiftUI + AVAudioPlayer)

I have successfully setup a background capable audio player with Lock Screen controls, but when it comes to setting the info, nothing seems to work. When I first start playing music in the app and ...
Trevor's user avatar
  • 873
1 vote
1 answer
125 views

Playing audio file from Firebase not working

I'm (unsuccessfully) trying to play an audio file stored in Firebase using AVAudioPlayer. I'm getting the following error message: Error creating audio player: The operation couldn’t be completed. (...
Booysenberry's user avatar
-1 votes
1 answer
67 views

Why AVAudioPlayer always shows -160 dB averagePower level

I have AVAudioPlayer initialized in my macOS app like below: do { let audioFile = Bundle.main.path(forResource: "sample", ofType: "mp3")! let audioURL = URL(filePath: ...
Dawy's user avatar
  • 948
1 vote
0 answers
112 views

AVAudioSessionCategoryOptions.mixWithOthers stops background music the first time when audio is player, only once

My app plays sounds such as timers. It should not pause or duck any background music. I use the audio_sessions package with config for it: AudioSession.instance.then((session) async { await session....
Jonas's user avatar
  • 7,902
1 vote
0 answers
242 views

AVAudioPlayer Crashed On iOS 17, How To Fix?

It worked well on system version before iOS 17. After the iOS system version was upgraded to 17, a large number of crashes occurred. What happened? AQ::API::V2Impl::AllocateBuffer(OpaqueAudioQueue*, ...
bird's user avatar
  • 11
2 votes
1 answer
459 views

Entitlement com.apple.developer.playable-content is missing (CarPlay) with XCode15

Since XCode 15, we can't get our app in the app store no more. While uploading, we get the message: "Entitlement com.apple.developer.playable-content is missing". The entitlement is for ...
Thread Pitt's user avatar
0 votes
1 answer
58 views

Avoid audio from iPhone speakers while recording audio from the same iPhone

I am working on an app where the app continuously records audio. In between it also plays audio which are fetched through our server's in wav format. Everything is working fine. Audio is recording and ...
iDeveloper's user avatar
3 votes
1 answer
991 views

iOS 17 Beta Shared AVAudioPlayer State Between App and Widget

I'm working on creating an audio playback widget for my app, aiming for functionality similar to the Apple Music widget. Specifically, I've implemented a play button in my widget that triggers an ...
Radiooactiven's user avatar
1 vote
0 answers
184 views

How to play the next song automatically when the first one ends?

I've created an audio player using SwiftUI in Xcode 15 Beta, the code as you can see below. However, my current goal is to have the audio player automatically play the next track once the preceding ...
Amelia Citra's user avatar
0 votes
0 answers
283 views

Bluetooth audio player commands

I am developing an app using React Native with an audio player in it. I am trying to find out how to listen for Bluetooth audio commands like Play, Pause, Stop, Skip forward, Skip back. All of these ...
rjapenga's user avatar
  • 277
1 vote
0 answers
60 views

AVAudioSession not respecting silent switch when using head phones

I am trying to use AVAudioSession and AVAudioPlayer to play a short sound in an app, but only when the silent mode is not on. Using the .ambient category seems to be doing this as expected. But when I ...
Per Thomas Haga's user avatar
0 votes
1 answer
150 views

My application records and plays sound using AVAudioPlayer, starting for example from the fifth playback it gives an error

I record and play sound using AVAudioPlayer, everything works fine in the simulator, but on the device, for example, starting from playing the fifth record, it gives the error "Open failed The ...
Миша Гарлинский's user avatar
1 vote
0 answers
83 views

My loop makes a click noise each time it starts

The loop plays smoothly in audacity but when I run it in the device or simulator it clicks each loop at different intensities. Im using .flac format because it's the only one not adding a little ...
Fran's user avatar
  • 704
1 vote
0 answers
44 views

Audio crackle issues occur after some ui interactions

Periodically have issues with crackling audio playback after ui interactions. I have so far been unable to reproduce the issues by repeating the same steps once the app is restarted. it seems to ...
Deji Toki's user avatar
0 votes
1 answer
60 views

playing the next audio file in a playlist when in a background state

I have this class that manages the playlist of audio, it works when the app is active (screen on). how can I get it to work when the app is in the background? At the moment, if I put the phone to ...
Halpo's user avatar
  • 3,154
2 votes
2 answers
81 views

audio player stutters when slider updates every second

I am using TvOSSlider in my tv app to create a seek-bar and play audio track with AVAudioPlayer. My problem is that it is stuttering every time i update the seekbar/slider through code. So currently ...
Haseeb Hassan Asif's user avatar
1 vote
1 answer
178 views

Swift avoid AVAudioPlayer from webview streaming

I'm facing a issue with audio player when I clicked play in embed player. One Kind of embed player not show the native audio player and another does. embed player issue video I have tried intercepting ...
sidneivl's user avatar
  • 254
0 votes
0 answers
71 views

Why does AVAudioPlayer not work when button pressed?

VIew: import AVFoundation import SwiftUI struct SutraView: View { private var audioPlayer: AVAudioPlayer? private mutating func playAVAudio(text: String) { guard let ...
Kuralay Biehler's user avatar
0 votes
1 answer
106 views

Setting an @EnvironmentObject value when using AVAudioPlayerDelegate in a SwiftUI view hierarchy

I'm playing a sound in a SwiftUI view, and I'd like to set a value in an @EnvironmentObject when the sound completes. So, I declare protocol compliance, and my completion handler is duly called. BUT, ...
Andromeda's user avatar
  • 683
0 votes
0 answers
63 views

How to make a AVAudioPlayer start immediately playing after another has finished?

I have created two AVAudioPlayer instances: introPlayer = try AVAudioPlayer(contentsOf: introURL) introPlayer?.numberOfLoops = 0 introPlayer?.prepareToPlay() introPlayer?.delegate = self loopPlayer = ...
John DoeDoe's user avatar
3 votes
0 answers
404 views

SwiftUI watchOS play sound on speaker loud and continue music

I want to create a watchOS App which play's a sound if I press a button. this sound should be played on the speaker with maximum volume. After the sound ends, the music should continue and the volume ...
moxmlb's user avatar
  • 1,380
0 votes
1 answer
93 views

Can't play offline audio

I have the following code func getAudioUrl(book: Book) -> URL? { guard let documentsDirectory = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first else { print(...
Chris Hansen's user avatar
  • 8,791
0 votes
1 answer
242 views

How to implement AVAudioplayer's delegate method to play next song automatically?

I read through many similar questions on stackoverflow, and while they helped, I still can't get the next song to play automatically when the one that's currently playing finishes. Since I start the ...
A A's user avatar
  • 11
1 vote
0 answers
246 views

How can I normalize audio track in flutter?

I am using Just Audio Player. I want to normalize song while playing. I tried using setVolume function but its only change the volume of the player. It does not normalize the song. What I want is a ...
Rock's user avatar
  • 13
1 vote
0 answers
342 views

How to create flexible audio player with background services and mini player in flutter

i want to create a flutter app in which music player is created 1)first screen will be list of audio ,which is from network url (with just audio package) 2)after click on one audio it will redirect to ...
Ritesh Patel's user avatar
1 vote
1 answer
50 views

Download length from track makes app to freeze SwiftUI

I've been searching for a method how to display track length from URL that is stored on the server. I found this method in Swift: AVPlayer - How to get length of mp3 file from URL? working fine: let ...
user avatar

1
2 3 4 5
56