Comments (6)
I also have these exact errors. Any update on how to fix this?
from sfbaudioengine.
sbooth/AudioXCFrameworks#25 will fix the illegal bundle characters error.
from sfbaudioengine.
I've been experimenting with different ways to package SFBAudioEngine to make it simpler to build and include in other projects.
Initially I'd hoped the dependencies could be included as binary Swift package targets, but SPM doesn't handle dependencies for binary targets so getting, for example, the vorbis and flac frameworks to both depend on the ogg framework isn't realistically feasible. I think there are some gymnastics that can be done by making the binary target depend on an empty source target that then includes the binary sub dependency, but I don't really want to go down that road.
iOS doesn't permit umbrella frameworks so the current build strategy isn't viable.
To avoid building SFBAudioEngine as an umbrella framework the app using it will have to include the framework dependencies. Statically linking the code into a single SFBAudioEngine binary isn't an option because of LGPL requirements.
There are two options I've been contemplating for the dependencies:
- Include the compiled XCFramework dependencies in the repo
- Make the compiled XCFrameworks available as an external download
I'm leaning toward option 1 for simplicity.
from sfbaudioengine.
I'm not sure if this helps but we currently use your ogg/opus frameworks in an internal package that is built cross platform. Our current approach isn't ideal but it is working for our limited deps. If the compiled frameworks were in the repo then this would help make things simpler.
Once built we copy the compiled frameworks into a Frameworks folder in the root of the Swift package and then use the following Package config...
...
targets: [
.target(
name: "MyPackage",
dependencies: ["COpusFile"]),
.target(
name: "COpusFile",
dependencies: ["ogg", "opus"],
path: "Sources/COpusFile"),
.binaryTarget(
name: "ogg",
path: "Frameworks/ogg.xcframework"
),
.binaryTarget(
name: "opus",
path: "Frameworks/opus.xcframework"
)
]
...
where COpusFile just includes the following dummy swift bridge.
#include <ogg/ogg.h>
#include <opus/opusfile.h>
#include "bridge.h"
void __dummy() {}
We are then able to add the package as a project dep in Xcode and import COpusFile
in Swift land and everything seems to just work. No idea if this is the right approach or not, it was mostly trial and error to get this point but it does upload to TestFlight at least.
from sfbaudioengine.
@andykent thanks for that. Out of curiosity if you add vorbis or flac (which also have dependencies on ogg) to your package do you get warnings about duplicated targets?
Right now I am leaning toward the following approach:
- Remove the
XCFrameworks
submodule and replace it with a directory - Check in compressed versions of the
.xcframework
files in theXCFrameworks
directory - Create a target to decompress the xcframework archives as needed (using
make
most likely) - Update the examples to link the frameworks
I think this will go a long way toward improving the usability of SFBAudioEngine
for developers.
from sfbaudioengine.
This should be fixed in #230. Any testing to verify the new build process would be appreciated.
from sfbaudioengine.
Related Issues (20)
- Issues with building macOS Sample Player HOT 1
- Can't run in physical device HOT 3
- The opus file is seriously distorted, and only one side of the speaker has sound. HOT 3
- When the speex file is playing, only one side of the speaker has sound, and SFBAudioPlayer.totalTime is nil HOT 3
- I keep getting an error when converting to apple native format, like m4a aac HOT 4
- Total frames not calculated for Ogg Speex streams HOT 1
- When encoding to mp3, the bitrate is always 128kbps HOT 5
- LAME encoder settings are confusing HOT 1
- Whatβs the role of SFBFFmpegDecoder HOT 1
- How to set the output sampleRate HOT 1
- OPUS file duration in milliseconds HOT 3
- SFBFLACDecoder - decodeIntoBuffer - not decoding all frames HOT 5
- Add .podspec for Cocoapods HOT 1
- Looping a decoder region doesn't work HOT 1
- Unable to stream MP3/WAV and possibly other formats HOT 3
- playReturningError failure HOT 6
- How to changed speed
- Importing Package HOT 2
- macOS 14+ dependencies? HOT 6
- Unable to convert some audio formats
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sfbaudioengine.