We have collected the most relevant information on Avaudioplayer Doesn Play Sound. Open the URLs, which are collected below, and you will find all the info you are interested in.


How to fix the common "no sound from AVPlayer ...

    https://www.globalnerdy.com/2015/07/06/how-to-fix-the-common-no-sound-from-avplayer-avaudioplayer-problem-in-ios-swift-programming/#:~:text=Here%E2%80%99s%20the%20short%20answer%3A%20Because%20your%20AVPlayer%20or,long%20answer%2C%20complete%20with%20code%20examples%2C%20appears%20below.
    none

objective c - AVAudioPlayer not playing any sound - Stack ...

    https://stackoverflow.com/questions/8016765/avaudioplayer-not-playing-any-sound
    Even having audioPlayer var declared in the class scope, it won't play. At least on iOS 10 iPhone 5c physical device. play () result is true so no errors appear to happen. Had to add this ( Swift 3, 4) and now it plays the sound correctly. let session = AVAudioSession.sharedInstance () try! session.setCategory (AVAudioSessionCategoryPlayback) Share

AVAudioPlayer doesn't load sound

    https://www.py4u.net/discuss/1363799
    Then, get rid of the AVAudioPlayer * from the line where you assign theAudio in viewDidLoad. This will cause your view controller to retain the audio player, and thus will prevent the player from being deallocated before playback. Answered By: Alex Nichol

How to fix the common "no sound from AVPlayer ...

    https://www.globalnerdy.com/2015/07/06/how-to-fix-the-common-no-sound-from-avplayer-avaudioplayer-problem-in-ios-swift-programming/
    That way, all you have to follow along is either type in or copy-and-paste code without having to bring a sound file into your project. While these examples use an AVPlayer object to play an online MP3, what I’m demonstrating is equally valid for apps that use an AVAudioPlayer object to play an MP3 stored as a local file or in memory.

Why is AVAudioPlayer not making any sound? - MacRumors

    https://forums.macrumors.com/threads/why-is-avaudioplayer-not-making-any-sound.2015253/
    I think the answer is about three lines of code, and that's the problem. Your player object is being dealloced immediately. The way you've written the code with initializing blank AVAudioPlayer...

Now you know Avaudioplayer Doesn Play Sound

Now that you know Avaudioplayer Doesn Play Sound, we suggest that you familiarize yourself with information on similar questions.