-
-
Notifications
You must be signed in to change notification settings - Fork 686
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
Swift implementation (IOS Equalizer) #658
Swift implementation (IOS Equalizer) #658
Conversation
…stant/just_audio into feature/new_ios_implementation
feature/new ios implementation
Fix seek with differente index song
Fix setShuffleMode and setLoopMode
Improve error handling in ios
Oh, wow. That must have been a big job to convert all of that into Swift, and also implement AVAudioEngine (I see you tried at one point to use AudioKit - any reason for reverting?). Ideally this could co-exist with the objc implementation while it become stable, and the federated plugin model is supposed to allow this, but last I checked a default endorsed implementation can't be overridden unless the implementation is written in Dart. I'll have to check if there are any updates on this, otherwise it could be tricky to have these both coexist. |
@ryanheise Not all I undertake are mine. Those from AudioKit aren't mine. They are derived from the branch which was linked in the issue. I needed a player with an equalizer and this seemed like the simplest solution, continue the implementation in swift. |
@ryanheise The reason I ditched AudioKit was that it didn’t work smoothly. Some basic functionality didn’t even work. Also the pod package wasn’t keeping up to date with the GitHub code of theirs. so I tried using AudioKit at first, bus because basic play and pause functionality wasn’t working without doing weird and dirty tricks. I ended up switching to AVAudioEngine. @SimoneBressan thanks for cleaning up the swift code! And all the improvements you made. I’m not a native swift developer. So converting it from c was doable but the code didn’t really felt clean and robust to me. ow and I was using two different GitHub accounts, one of my clients accounts. And my personal one to work on it during the evening and weekends. So that’s why the commits are a bit of a mess 😬. anyways great work all! The equalizer of iOS is actually ahead of Android in terms of flexibility. I’m looking forward to get this all merged within this library, so that the community can maintain and improve it! 🥳 |
Ah, @toonvanstrijpwavy my apologies for not acknowledging your name earlier. Excellent work! Yes, I seem to recall when AudioKit 5 was originally coming out, the main author expressed some dissatisfaction with cocoapods and didn't want to continue doing those releases. I was later reassured when I saw the pod actually did come out, but from your comment above it seems like maybe they aren't diligent in updating it? From what I gather, AudioKit provides wrappers for all of the AVAudioEngine features but also provides extra utility for the visualizer which is another feature we need on iOS. For that reason, I was thinking AudioKit would be the way to go. But of course it is still possible to implement the visualizer on top of AVAudioEngine, and we now also have a pull request implementing the visualizer on iOS for the current Objective C version which might be useful as a reference. |
Fix crash when queue is empty
I think this has now been solved, and I think we can use path_provider as a reference. Before merging this, I will need to create a separate package for the iOS implementation and then update the pubspec to list that as the default implementation. Then the new swift implementation would also be implemented as a separate package, hopefully allowing the app to choose which package to plug in. I haven't fully investigated everything yet, in case it's not completely supported yet, a workaround is suggested here: |
Fix first play incorrect initialIndex
Oops, it seems that when I renamed the |
I'm very lost here trying I've been trying to implement the equalizer to my project, it runs perfectly on Android but I couldn't figure out the way to make it work on IOS can you please share any kind of instructions on where to start to implement this on IOS, |
Replaced by #784 |
I have opened this PR to trace the development of the implementation in swift and to give the possibility to use the equalizer in both platforms.
It is not stable and it is not complete. Any contribution is welcome. This branch originated from:
https://github.com/wavy-assistant/just_audio/tree/feature/new_ios_implementation
RelatedIssue: #334
Basic Features:
play
pause
stop
seek
seekToNext
seekToPrevious
setVolume
setSkipSilenceEnabled
setSpeed
setLoopMode
setShuffleModeEnabled
shuffle
setAutomaticallyWaitsToMinimizeStalling
setCanUseNetworkResourcesForLiveStreamingWhilePaused
setClip
setPitch
setPreferredPeakBitRate
Media Supports:
Equalizer:
Extra: