I had this new pair of airpods since 2022 bundled with my iPhone 12. I tried connecting to PC as of now, and what's annoying is that my Airpods keep disconnecting by itself from my Windows PC! I am so upset now, and I need your help!
Sound and Haptics
RSS for tagCreate meaningful and delightful experiences that engage a wider range of senses with sound and haptic design.
Posts under Sound and Haptics tag
17 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
Just got my hands on the Apple Pencil Pro, and was looking forward to being able to add tactile feedback to my apps through the Pencil.
Apple appears to have updated their docs to make mention of the possibility of haptic feedback via the pencil and makes vague references to a certain SwiftUI modifier, but doesn't give any pencil-specific guidelines, code or speak about its capabilities at all. I'd like to ask if its possible to use CoreHaptic to queue custom haptic feedback (as of now the standard code which works on iPhone doesn't seem to work on an iPad with a paired Pencil Pro), or if that's not possible if there are any updated resources/example code for triggering predefined Pencil Pro haptics.
Can I use Apple's sound recognition in my augmented reality app to trigger content ? Or is there another source I can use?
Hi, I noticed that several of the top Vision Pro apps such as Disney+ and Max have similar if not identical SFX for basic navigation like Select and Back. I was wondering if Apple has provided an audio SFX library as a resource, or if the similarity is coincidental.
I'm not familiar with Apple providing anything like this in the past, but figured on a totally new platform where they might be trying to establish a paradigm, it was worth looking into!
Hello,
I've encountered a concerning issue while working with Core Haptics which I believe warrants attention from the community and Apples engineering team. When attempting to play a haptic pattern using the ChHapticEngine.playPattern method with a corrupted AHAP file path, I've observed unexpected behavior. Specifically, the player is immediately destroyed, triggering the notifyWhenPlayersFinished callback with nil error before executing the catch block(catch block is eventually executed), Furthermore, this behavior introduces ambiguity regarding the successful playback of haptic patterns, as corrupted files can produce false positives in error notifications.
Current workaround is simple, AHAP files are JSON formated files at the end of the day, so just try to decode data or create Foundation object from given JSON data. and if this fails then data must not be in expected format(or decoding strategy is off), that way you can guarantee the validity of an AHAP file before passing it to your player.
Michaud Reyna,
Senior iOS Engineer
Hi everyone,
I'm currently facing an issue with AVAudioPlayer in my SwiftUI project. Despite ensuring that the sound file "buttonsound.mp3" is properly added to the project's resources (I dragged and dropped it into Xcode), the application is still unable to locate the file when attempting to play it.
Here's the simplified version of the code I'm using:
import SwiftUI
import AVFoundation
struct ContentView: View {
var body: some View {
VStack {
Button("Play sound") {
playSound(named: "buttonsound", ofType: "mp3")
}
}
}
}
func playSound(named name: String, ofType type: String) {
guard let soundURL = Bundle.main.url(forResource: name, withExtension: type) else {
print("Sound file not found")
return
}
do {
let audioPlayer = try AVAudioPlayer(contentsOf: soundURL)
audioPlayer.prepareToPlay()
audioPlayer.play()
} catch let error {
print("Error playing sound: \(error.localizedDescription)")
}
}
Hi,
I'm building a simple game for iOS. I have background music.
The ring/silent switch is not disabling sound when switched to silent.
So far I'm testing on devices through TestFlight (still internal testing, not beta).
Do I need to code this function myself or does iOS know it's a game and disable sound automatically?
and/or
would my game be rejected if the switch doesn't disable sound?
(I have an internal setting to enable/disable sounds in the game)
Due to the way it's coded (capacitor app), I can't access the ring/silent switch to disable/enable sound.
Thanks, this problem makes me feel like a preserved moose.
Is there any way we can add a global setting for sound notifications on MacOS, or an option to have the default for newly installed apps to have sound notifications off by default?
Currently, sound notifications for apps need to be turned off one by one, which can be time intensive if lots of apps are installed.
Generate tones, etc. in code? Is there a way?
Regards, Patrick
I'm involved in development on an iOS app for home security and alarm systems. There is recently a lot of negative feedback from customers about how low the notification sounds are since iOS17. Much of the feedback centers around the inability to control the volume of the notification sounds.
My question is: if our app uses custom notification sounds, are these impacted by the volume changes made in iOS 17? I know previous versions of iOS allow you to control "Ringtone and Alert" volume in settings (with a volume slider). Is this same control still available for custom notification sounds within our app?
Please Teach me.
I wan't to get list of SystemSoundId. (relation can file) (Officially if possible)
(example)
1001 - mail-sent.caf
1002 - Voicemail.caf
・
・
I know where [.caf] file in iPhone.
/System/Library/Audio/UISounds/
but, I don't know relation [.caf] and soundId.
Where are my custom text tones? How do I restore my custom text tones? I want my custom text tones back. Are you planning to fix this or am I going to android?
Hi Developers,
Requesting you to please fix the default notification tone "Rebound", its too low and short. I'm missing most of my notifications.
We've been doing the following in our app for years without issues:
[[NSSound soundSystem:@"Basso"] play]
Suddenly we're seeing hundreds of crashes from macOS 14.0 users and we're not sure what's causing this. There are no memory leaks within the app and all the stack traces are around NSSound:
0 AudioToolbox 0x1f558 MEDeviceStreamClient::RemoveRunningClient(AQIONodeClient&, bool, bool) + 3096
1 AudioToolbox 0x1e8fc AQMEDevice::RemoveRunningClient(AQIONodeClient&, bool) + 108
2 AudioToolbox 0x1e854 AQMixEngine_Base::RemoveRunningClient(AQIONodeClient&, bool) + 76
3 AudioToolbox 0xcdd78 AudioQueueObject::StopRunning(AQIONode*, bool) + 244
4 AudioToolbox 0xcbdd0 AudioQueueObject::Stop(bool, bool, int*) + 736
5 AudioToolbox 0xf1840 AudioQueueXPC_Server::Stop(unsigned int, bool) + 172
6 AudioToolbox 0x1418b4 ___ZN20AudioQueueXPC_Bridge4StopEjb_block_invoke + 72
7 libdispatch.dylib 0x3910 _dispatch_client_callout + 20
8 libdispatch.dylib 0x130f8 _dispatch_sync_invoke_and_complete_recurse + 64
9 AudioToolbox 0x141844 AudioQueueXPC_Bridge::Stop(unsigned int, bool) + 184
10 AudioToolbox 0xa09b0 AQ::API::V2Impl::AudioQueueStop(OpaqueAudioQueue*, unsigned char) + 492
11 AVFAudio 0xbe12c AVAudioPlayerCpp::disposeQueue(bool) + 188
12 AVFAudio 0x341dc -[AudioPlayerImpl dealloc] + 72
13 AVFAudio 0x358a0 -[AVAudioPlayer dealloc] + 36
14 AppKit 0x1b13b4 -[NSAVAudioPlayerSoundEngine dealloc] + 44
15 AppKit 0x1b132c -[NSSound dealloc] + 164
16 libobjc.A.dylib 0xf418 AutoreleasePoolPage::releaseUntil(objc_object**) + 196
17 libobjc.A.dylib 0xbaf0 objc_autoreleasePoolPop + 260
18 CoreFoundation 0x3c57c _CFAutoreleasePoolPop + 32
19 Foundation 0x30e88 -[NSAutoreleasePool drain] + 140
20 Foundation 0x31f94 _NSAppleEventManagerGenericHandler + 92
21 AE 0xbd8c _AppleEventsCheckInAppWithBlock + 13808
22 AE 0xb6b4 _AppleEventsCheckInAppWithBlock + 12056
23 AE 0x4cc4 aeProcessAppleEvent + 488
24 HIToolbox 0x402d4 AEProcessAppleEvent + 68
25 AppKit 0x3a29c _DPSNextEvent + 1440
26 AppKit 0x80db94 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 716
27 AppKit 0x2d43c -[NSApplication run] + 476
28 AppKit 0x4708 NSApplicationMain + 880
29 ??? 0x180739058 (Missing)
No options for text tones, only whats on phone, can't even buy from store etc
No option for notification sounds on various apps, just the very quiet beep (can never hear it!!)
So disappointed in this, what is going on? more control is it?
Get it changed !!!
I am wondering if it is possible for a watch app to play a haptic alert when it receives a background notification.
I want to send the user a haptic alert if a value in a database reaches a certain threshold.
It is so frustrating and the second time this has happened to me. I found a fix for the first time, but can't seem to find one now. Help!
Anyone know what to do to stop the noise?
Lisa