-
-
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) #784
base: minor
Are you sure you want to change the base?
Conversation
add pitch control, throw when a method is unimplemented example add buttons add errors shuffle order todo shuffle fix exports fix typo and xcode warnings
Give credit to [klaep](https://www.klaep.com/) on these features development
add custom errors delete static function to throw errors moved new files in darwin and add symbolic link relative path drop underscore in resume player func
… to work on the macos pod build
**Problem** | ||
|
||
Native `macos` and `ios` projects share most of the code. Sadly, CocoaPods does not allow to | ||
reference files outside of the root project directory, or to symlink `.swift` files. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really? The symlink solution does at least work for objective C. For swift, I have seen other solutions to code sharing, though, a type of include/import-based solution.
minor refactor to JustAudioPlayer.swift to share it across ios and macos implementation
feat: allow to specify a set of effects for each audio source
@@ -765,29 +765,39 @@ private void loudnessEnhancerSetTargetGain(double targetGain) { | |||
((LoudnessEnhancer)audioEffectsMap.get("AndroidLoudnessEnhancer")).setTargetGain(targetGainMillibels); | |||
} | |||
|
|||
// dB = 0.1 bels | 0.8 = Equalize the level between ios and android | |||
private short dbToMillibels(double value) { | |||
return (short)(Math.round(value * 100.0 * 0.8)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: double space between return
and (short)
.
|
||
// dB = 0.1 bels | 0.8 = Equalize the level between ios and android | ||
private double millibelsToDb(int value) { | ||
return (double)(Math.round(value / 100.0 / 0.8)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: double space between return
and (double)
.
|
||
import Foundation | ||
class NotSupportedError: PluginError { | ||
var value: Any |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can be let
import Foundation | ||
|
||
class PluginError: Error { | ||
var code: Int |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
both properties can be let
fix: add missing index mappings for seek method fix: wrong start/end parsing (presumed seconds received microseconds)
Hi! Any updates on this PR? Would be great to have an equalizer for iOS as well. Thank you |
I can sponsor adding a few iOS features, namely setPitch |
Driving by to ask for the PR for iOS EQ. Thank you for the work y’all do |
Yeah adding my 2p, would love this too- mainly for Finamp: jmshrv/finamp#717 |
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.
The goal now is to complete this implementation 100%!
You can use this package by pointing to the git repository.
No changes other than the original package are needed to make the project work.
Follow the documentation.
It is not stable and it is not complete. Any contribution is welcome. This branch originated from wavy-assistant branch.
Previous PR: #658
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:
Future features: