Post

Replies

Boosts

Views

Activity

RealityKit Spatial Audio - Volume drops abruptly
I have a class with an Entity, on which I added a Spatial Audio component. Furthermore, I have a function, which uses the playAudio() method to start the Spatial Audio. During the first call of the function, everything is fine. If I call the again, the audio volume drops abruptly after a half second. It is very quiet. Approximately, I have following code: class VoiceOutputPlayer: NSObject, ObservableObject, AVAudioPlayerDelegate { private var speechEntity = Entity() func play() { Task{ let audioRessource = try await AudioFileResource(contentsOf: urlWave) self.speechEntity.playAudio(audioRessource) } } func initSpatialAudio() -> Entity { speechEntity.transform.translation.y = -0.37 speechEntity.transform.translation.z = 0.09 speechEntity.spatialAudio = SpatialAudioComponent(gain: Double.zero) speechEntity.spatialAudio?.reverbLevel = -2 speechEntity.spatialAudio?.directivity = .beam(focus: 0.9) speechEntity.orientation = .init(angle: .pi, axis: [0, 1, 0]) speechEntity.spatialAudio?.distanceAttenuation = .rolloff(factor: 1) return speechEntity } } Have visionOS 2.2 on the Apple Vision Pro and use Xcode 16.1
1
0
341
Nov ’24
xCode - ITMS-90111: Unsupported SDK or Xcode version
When I try to upload an app to the AppStore, I receive following feedback: I had Xcode 16 with visionOS installed. Because of the feedback, I switched back to Xcode 15.3 with visionOs 1.0. I archived it again and tried to upload the app again. But I still receive the same feedback. I also tried https://stackoverflow.com/questions/56518791/app-store-refuses-my-update-after-installing-xcode-11-beta-with-keeping-xcode-10/56623421#56623421, but it seems that there is no such property for visionOS in the info.plist I do not have any further ideas...
2
2
862
Jun ’24
Error loading ReferenceImage
Currently, I try to test the ImageTrackingProvider with the Apple Vision Pro. I started with some basic code: import RealityKit import ARKit @MainActor class ARKitViewModel: ObservableObject{ private let session = ARKitSession() private let imageTracking = ImageTrackingProvider(referenceImages: ReferenceImage.loadReferenceImages(inGroupNamed: "AR")) func runSession() async { do{ try await session.run([imageTracking]) } catch{ print(error) } } func processUpdates() async { for await _ in imageTracking.anchorUpdates{ print("test") } } } I only have one picture in the AR folder. I added the size an I have no error messages in the AR folder. As I am trying to run the application with the vision Pro, I receive following error: ar_image_tracking_provider_t <0x28398f1e0>: Failed to load reference image <ARReferenceImage: 0x28368f120 name="IMG_1640" physicalSize=(1.350, 2.149)> with error: Failed to add reference image. It finds the image, but there seems to be a problem with the loading. I tried the jpeg and the png format. I do not understand why it fails to load the ReferenceImage. I use Xcode Version 15.3 beta 3
2
0
1k
Feb ’24