Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SwiftAudioPlayer without pods? #185

Open
ideategames opened this issue May 4, 2024 · 1 comment
Open

SwiftAudioPlayer without pods? #185

ideategames opened this issue May 4, 2024 · 1 comment

Comments

@ideategames
Copy link

Your SwiftAudioPlayer is exactly what I need for a player of complex sound files. They are very large (>1GB) wav files, and streaming with AVPlayer or AVAudioPlayer don't cut it.

I am a novice in Swift but a programmer for many years. My problem is that I use a framework (Solar2d) and I cannot get the integration with pods to work. Someone in a forum wrote that it can work, but he forgot how he did it. Always
The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.
And then /Users/Shared/Mobile/SScapeN2/ios/SwSound.swift:10:8 No such module 'SwiftAudioPlayer'
I have tried everything I have seen on in other forums (updates, clean, etc), nothing fixes these. I do get a 'warning' that seems fixable, but I haven't figured it out. pod install says "include the Target Support Files/Pods-SoundScape/Pods-SoundScape.release.xcconfig in your build configuration (CoronaApp.xcconfig)."

I was just wondering if it is possible to just add the SwiftAudioPlayer swift files into the project, make it simpler. But then, which files?

Sorry I am so ignorant in this, just running in circles.

@ideategames
Copy link
Author

ideategames commented May 5, 2024

I learned to bypass pod, very simply by adding package dependency. All looks good, now trying it. The biggest problem I have is the delay for playing a very large (>1.5GB) wav file. I am looking for a solution that can do this. I know it can be done because Solar2d does it, but Solar2d does not allow me to play when the app is not the current app (background).

My mistake (earlier version of this) -- it starts right away and streams the very large wav file. However, it often plays in bursts, not always. Maybe just my network? Is there a setting to fix that, such as starting the streaming but delaying the playback?

often it has this error soon after starting:
Task <53AEFCA4-1F8E-4666-B559-879C5EF79EAF>.<2> finished with error [-997] Error Domain=NSURLErrorDomain Code=-997 "Lost connection to background transfer service" UserInfo={NSErrorFailingURLStringKey=https://...@ideategames.org/soundscape/....wav, NSErrorFailingURLKey=https://...@ideategames.org/soundscape/....wav, _NSURLErrorRelatedURLSessionTaskErrorKey=(

Then the sound cuts off about 20 seconds later. Any help or insight would be greatly appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant