Integrate music and other audio content into your apps.

Posts under Audio tag

201 results found
Sort by:
Post not yet marked as solved
6.0k Views

tvOS14 Audio Output Sources Missing

tvOS14 has no option to choose an output source so No Airplay to homepods. Has the Option moved or been removed from this version? I see nothing about it in the release notes
Asked
by pacman.
Last updated
.
Post not yet marked as solved
172 Views

Spatial audio

So I updated to ios14 I wanted to try spatial audio with my AirPods Pro. It works 50/50 like when I move my head it picks it up and changes where the audio comes from but when I move my phone it doesn’t pick it up I’m on a 7 plus both devices are on the latest firmware. Do let me know now what I can do. Btw I don’t use Apple TV I was watching the Apple event on the Apple TV app.
Asked
by Manav0314.
Last updated
.
Post marked as solved
99 Views

MusicCatalogSearchRequest without AppleID/Account on iPhone

Hi, I'm currently working on a little music app PoC. I want to search the albums in the Apple Music Catalog which will done via a MusicCatalogSearchRequest: let musicAuthorizationStatus = await MusicAuthorization.request() print(musicAuthorizationStatus) // Issue a catalog search request for albums matching search term. var searchRequest = MusicCatalogSearchRequest(term: searchTerm, types: [Album.self]) searchRequest.limit = 5 let searchResponse = try? await searchRequest.response() print(searchResponse?.albums) I would expect to get a valid search response but it is nil instead. This is the console log when no AppleID is configured on my test device: 2021-06-15 23:07:19.083194+0200 ShareFi[1519:727518] [Entitlements] MSVEntitlementUtilities - Process ShareFi PID[1519] - Group: com.apple.private.tcc.allow - Entitlement: kTCCServiceMediaLibrary - Entitled: NO - Error: (null) .authorized 2021-06-15 23:07:19.130446+0200 ShareFi[1519:727542] [DataRequesting] Failed retrieving MusicKit tokens: Error Domain=ICErrorDomain Code=-8102 "Failed to fetch user token." UserInfo={NSDebugDescription=Failed to fetch user token., NSUnderlyingError=0x2825d8750 {Error Domain=ICErrorDomain Code=-7401 "No active account." UserInfo={NSDebugDescription=No active account.}}}. Throwing .userTokenRequestFailed. 2021-06-15 23:07:19.131133+0200 ShareFi[1519:727542] [DataRequesting] Failed retrieving tokens for MusicDataRequest.Context(url: https://api.music.apple.com/v1/catalog/us/search?term=Earfood&types=albums&omit%5Bresource%5D=autos&limit=5). Error = .userTokenRequestFailed. When I use a sandbox account the error is still a .userTokenRequestFailed but the message says something like: Privacy terms must be accepted first. The Apple Music API seems to require a "Developer Token" but no "User Token" for search requests?! So my questions are: Is it possible to make MusicCatalogSearchRequests without having an AppleID configured? What resources can a user without a active Apple Music subscription interact with? Best regards :) Julian
Asked
by juka1205.
Last updated
.
Post not yet marked as solved
65 Views

Use Audio Engine with MusicKit players "ApplicationMusicPlayer" or "SystemMusicPlayer"

I want to use AudioEngine to process audio and apply sound effects like reverberation, EQ, compressor, limiter and get more fun with favorite songs. I want to build this on top of MusicKit, ideally using SystemMusicPlayer. is there a way to process this output from SystemMusicPlayer over AudioEngine?
Asked
by typan112.
Last updated
.
Post not yet marked as solved
96 Views

list of sound classes in Sound Analysis announced in WWDC 2021

Dear all, I found the announced built-in sound classifier pretty amazing. I would appreciate it if you could point me to a link or a document that is listed all 300 sound classes mentioned in https://developer.apple.com/videos/play/wwdc2021/10036/. Thank you
Asked Last updated
.
Post not yet marked as solved
993 Views

Simulator causing Mac audio distortion

I am experiencing an issue where my Mac's speakers will crackle and pop when running an app on the Simulator or even when previewing SwiftUI with Live Preview. I am using a 16" MacBook Pro (i9) and I'm running Xcode 12.2 on Big Sur (11.0.1). Killing coreaudiod temporarily fixes the problem however this is not much of a solution. Is anyone else having this problem?
Asked
by joltguy.
Last updated
.
Post marked as solved
196 Views

How do I create the .shazamsignature file?

I want to create my own custom audio recognition with ShazamKit, when opening the sample project I found the FoodMath.shazamsignature file. I believe there is a way to generate that file based on my audio collections. How do I create the .shazamsignature file? Thanks.
Asked
by rzkhilman.
Last updated
.
Post not yet marked as solved
508 Views

Play html audio in wkwebview will report error: Required client entitlement is missing

An error is reported when playing h5 audio or video elements in wkwebview: Error acquiring assertion: Error Domain=RBSAssertionErrorDomain Code=3 "Required client entitlement is missing" UserInfo={RBSAssertionAttribute=RBSDomainAttribute| domain:"com.apple.webkit" name:"MediaPlayback" sourceEnvironment:"(null)", NSLocalizedFailureReason=Required client entitlement is missing} Then the performance of the webview will become very poor. There is an audio element and a button button in my HTML file. Click the button to play audio. body button onclick="handleClick()"PLAY/button audio id="audio" src="https://ac-dev.oss-cn-hangzhou.aliyuncs.com/test-2022-music.mp3"/audio script function handleClick() { document.getElementById("audio").play(); } /script /body Create a wkwebview to load the html file in my demo APP. class ViewController: UIViewController , WKUIDelegate{ var webView: WKWebView! override func loadView() { let config = WKWebViewConfiguration() config.preferences.javaScriptEnabled = true config.allowsInlineMediaPlayback = true webView = WKWebView(frame: .zero, configuration: config) //.zero webView.uiDelegate = self view = webView } override func viewDidLoad() { super.viewDidLoad() let myURL = URL(string: "https://ac-dev.oss-cn-hangzhou.aliyuncs.com/test-2022-py.html") let myRequest = URLRequest(url: myURL!) webView.load(myRequest) } } Click the button in the HTML to play the audio, and you can see the error report on the xcode. iPadN[2133:855729] [assertion] Error acquiring assertion: Error Domain=RBSAssertionErrorDomain Code=3 "Required client entitlement is missing" UserInfo={RBSAssertionAttribute=RBSDomainAttribute| domain:"com.apple.webkit" name:"MediaPlayback" sourceEnvironment:"(null)", NSLocalizedFailureReason=Required client entitlement is missing} To sum up, this error will appear when playing audio or video in HTML. Then the app performance will drop a lot, and the interactive response will be very slow.
Asked
by pengyong.
Last updated
.
Post not yet marked as solved
88 Views

MusicKit Album Release Data

When printing out an Album, the release date is included: Album(   id: "1566393640",   title: "Aquatic - Single",   artistName: "Nora En Pure",   genreNames: [     "Dance",     "Music"   ],   releaseDate: "2021-06-04",   isCompilation: false,   upc: "7640130765399" ) But it is not mentioned as an instance property here and I cannot identify any way to access it in my project. How can I go about getting access to this attribute via MusicKit? Thanks! :)
Asked Last updated
.
Post marked as solved
127 Views

MusicCatalogResourceRequest<MusicKit.Artist> Result Missing Instance Properties

Hello! I am trying a basic MusicCatalogResourceRequest to pull in a particular Artist from Apple Music. When printing out the result, it only contains the id and name of the Artist; ex : Artist(id: "78011850", name: "deadmau5") It is missing all of the instance properties as defined on the developer documentation. This is the snippet I am using, is there something missing? I am trying to fetch the related albums, but it is always returning nil. static func catalogAlbumsForArtistId(artistId: MusicItemID) async -> MusicItemCollection<MusicKit.Album>? { do {         let artistRequest = MusicCatalogResourceRequest<MusicKit.Artist>(matching: \.id, equalTo: artistId)         let artistResponse = try await artistRequest.response()         if let artist = artistResponse.items.first {             print("artist")             return artist.albums         }     } catch {         print(error)     }     return nil } Thanks! :)
Asked Last updated
.
Post not yet marked as solved
46 Views

Group Activity and AVAudioSession

For an App in the PlaybackAndRecording Category, would entering a Group Activity Session change the Category and Mode since FaceTime is ongoing? will we still have access to Microphone locally using, e.g. AVAudioEngine? if yes, will the presence of FaceTime force VoiceChat mode and VPIO in our session? Thanks in advance.
Asked Last updated
.
Post not yet marked as solved
88 Views

GroupActivities on iPadOS?

I forgot to ask this during my lab session, but I noticed iPadOS is not listed under supported OSes under the GroupActivities documentation page. iPadOS supports FaceTime, but is it that GroupActivies doesn't work on iPadOS? This would be a crying shame since one of the examples specifically involved drawing collaboratively. The iPad is the perfect device for that use case. EDIT: Quick edit. Coordinate media experiences with Group Activities mentions iPadOS support, in which case the first page I linked might have a missing OS entry.
Asked Last updated
.
Post marked as solved
103 Views

How can add songs to a playlist or create a new playlist from my APP?

Hi, I would like to be able to create a playlist from my app or add songs to an existing selected playlist in the user music library, How can I do that ? Is there an API in MusicKit to do that? The Shazam app is doing something similar with the My Shazam Songs playlist... Thanks
Asked
by aleroot.
Last updated
.
Post not yet marked as solved
94 Views

Disable Activity Start Drop-Down Toast Notifications?

I have an app that plays a series of on-demand videos in succession in an AVQueuePlayer. These clips are all quite short, most less than 30 seconds. I'd like to use a SharePlay activity to play them in sync across a group, but it seems like using an activity per content item will result in the toast notification coming on-screen between each video clip. This is nice for long-form content, but would quickly be maddening watching 15-30 second clips. Is there any delegate or other API available to disable these activity startup bubbles that appear from the top of the screen?
Asked
by wismar.
Last updated
.