Posts

Post not yet marked as solved
2 Replies
34 Views
Hi, I'm trying to convert a stream into a PCMBuffer and then use Shazam to match. Shazam always fails to match. I have a theory it "listens" to the playback at double speed or more. Starts from here: ... let format = audioEngine.outputNode.inputFormat(forBus: 0) guard let pcmBuffer = format.toPCMBuffer(frame: currentFrame) else {          return } session.matchStreamingBuffer(pcmBuffer, at: nil) Where toPCMBuffer is: extension AVAudioFormat {     func toPCMBuffer(frame: AudioFrame) -> AVAudioPCMBuffer? {         guard let pcmBuffer = AVAudioPCMBuffer(pcmFormat: self, frameCapacity: UInt32(frame.dataWrap.size[0]) / streamDescription.pointee.mBytesPerFrame) else {             return nil         }         pcmBuffer.frameLength = pcmBuffer.frameCapacity         for i in 0 ..< min(Int(pcmBuffer.format.channelCount), frame.dataWrap.size.count) {             frame.dataWrap.data[i]?.withMemoryRebound(to: Float.self, capacity: Int(pcmBuffer.frameCapacity)) { srcFloatsForChannel in                 pcmBuffer.floatChannelData?[i].assign(from: srcFloatsForChannel, count: Int(pcmBuffer.frameCapacity))             }         }         return pcmBuffer     } } AudioFrame is: final class AudioFrame: MEFrame {     var timebase = Timebase.defaultValue     var duration: Int64 = 0     var size: Int64 = 0     var position: Int64 = 0     var numberOfSamples = 0     let dataWrap: ByteDataWrap     public init(bufferSize: Int32, channels: Int32) {         dataWrap = ObjectPool.share.object(class: ByteDataWrap.self, key: "AudioData_\(channels)") { ByteDataWrap() }         if dataWrap.size[0] < bufferSize {             dataWrap.size = Array(repeating: Int(bufferSize), count: Int(channels))         }     } ... } and MEFrame is: extension MEFrame {     public var seconds: TimeInterval { cmtime.seconds }     public var cmtime: CMTime { timebase.cmtime(for: position) } }
Posted
by wotson.
Last updated
.
Post not yet marked as solved
0 Replies
359 Views
Hi, This is a very pecurliar problem. I have an audio app that plays when being launched. It has CarPlay entitlements, plays from the network and naturally plays in the background. Now, every one in a while the phone launchs the app in the background without notice. Music simply starts to play randomly. I can't determine the cause or the situation in which this reproduces. It might be related to Bluetooth connections, phone calls, CarPlay interactions, network changes or other reasons. I do know the following things for sure: The app is launched from scratch as I have examined remote logs and seen the app is being launched. Pausing the music from control center will kill the app, and it will be relaunching after 2-3 minutes again (and again) Any clues or ideas on why this happens or how to debug it further will be welcome. Thank you..!
Posted
by wotson.
Last updated
.
Post not yet marked as solved
0 Replies
291 Views
Hi, I would like to enable the user to use a custom Siri shortcut defined using INUIAddVoiceShortcutViewController and a matching UserActivity - to skip Lock Screen authentication. Is that possible? It looks like a Custom Intent might be the only way to define this.
Posted
by wotson.
Last updated
.
Post not yet marked as solved
0 Replies
190 Views
Hi, When activating AirPlay it seems MPVolumeView disappears. Without any ability to have on-screen slider to control the volume. This seems to be only available on Apple's apps. Am I missing something?
Posted
by wotson.
Last updated
.
Post not yet marked as solved
0 Replies
210 Views
Hi, I have a music app that plays music. From some reason when the navigation app (Waze in this instance) starts to talk, the music stops and doesn't return. When other interruptions happen (messages, voice call) everything works as expected. Any thoughts of what I'm missing?
Posted
by wotson.
Last updated
.
Post not yet marked as solved
1 Replies
187 Views
I have a radio app I wish to add shortcuts to. I wish to use INSetRadioStationIntent but it seems I'm unable to debug handling the intent. Anything I throw at Siri wouldn't trigger the delegate callbacks on the app extension.Any idea what can help understand this issue?
Posted
by wotson.
Last updated
.
Post not yet marked as solved
1 Replies
532 Views
Hi,It seems that when I press "next" on control center when playing something, my code gets called on twice instead of once, using MPRemoteCommandCenter.The two calls:1. nextTrackCommand2. seekForwardCommandBoth functions are enabled, but it doesn't make sense that both get called upon tapping the "next" button once.I've linked bellow to an example project that demonstrates this issue.https://github.com/gerbil802/MPRemoteCommandCenterProblem
Posted
by wotson.
Last updated
.
Post not yet marked as solved
0 Replies
450 Views
Hi,Not sure which forums is right for this topic, but here goes. When I launch my CarPlay enabled app, I'm seeing an empty list of items, although a stream has begun playing and also I've added UIBrowsableContentSupportsImmediatePlayback key (true) to the info.plist. Shouldn't that key basically remove that list of items?Thanks..!
Posted
by wotson.
Last updated
.
Post not yet marked as solved
0 Replies
372 Views
Hi guys,I am getting no NSUbiquitousKeyValueStoreDidChangeExternallyNotification notifications.It probably started in the last two days. My App Store build also stopped receiving those as well. It looks like a failure on iCloud.Anyone else experiencing such issues?I've also signed out and back in. Did not help.EDIT: I've restrarted my phone at some point, and now it's now working. That might have helped.
Posted
by wotson.
Last updated
.