mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-27 15:14:33 +00:00
Update live waveform using rtaudio
This commit is contained in:
parent
856aec7e16
commit
f7f29adea9
19 changed files with 893 additions and 5 deletions
|
|
@ -476,7 +476,7 @@ struct ExtensionEdgeContentView: View {
|
|||
.fill((colorDescriptor.isAccent ? accent : colorDescriptor.swiftUIColor).gradient)
|
||||
.frame(width: 48, height: 14)
|
||||
.mask {
|
||||
AudioSpectrumView(isPlaying: .constant(true))
|
||||
AudioVisualizerView(isPlaying: .constant(true))
|
||||
.frame(width: 16, height: 12)
|
||||
}
|
||||
case let .animation(data, size):
|
||||
|
|
|
|||
|
|
@ -326,7 +326,7 @@ struct LockScreenMusicPanel: View {
|
|||
Rectangle()
|
||||
.fill(Defaults[.coloredSpectrogram] ? Color(nsColor: musicManager.avgColor).gradient : Color.gray.gradient)
|
||||
.mask {
|
||||
AudioSpectrumView(isPlaying: .constant(musicManager.isPlaying))
|
||||
AudioVisualizerView(isPlaying: .constant(musicManager.isPlaying))
|
||||
.frame(width: width, height: height)
|
||||
}
|
||||
.frame(width: width, height: height)
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ struct MinimalisticMusicView: View {
|
|||
.fill(Defaults[.coloredSpectrogram] ? Color(nsColor: musicManager.avgColor).gradient : Color.gray.gradient)
|
||||
.frame(width: 50, alignment: .center)
|
||||
.mask {
|
||||
AudioSpectrumView(isPlaying: $musicManager.isPlaying)
|
||||
AudioVisualizerView(isPlaying: $musicManager.isPlaying)
|
||||
.frame(width: 16, height: 12)
|
||||
}
|
||||
.frame(width: max(0, vm.effectiveClosedNotchHeight - (isHovering ? 0 : 12)),
|
||||
|
|
|
|||
|
|
@ -640,7 +640,7 @@ private struct MinimalisticReminderDetailsView: View {
|
|||
Rectangle()
|
||||
.fill(Defaults[.coloredSpectrogram] ? Color(nsColor: MusicManager.shared.avgColor).gradient : Color.gray.gradient)
|
||||
.mask {
|
||||
AudioSpectrumView(isPlaying: .constant(MusicManager.shared.isPlaying))
|
||||
AudioVisualizerView(isPlaying: .constant(MusicManager.shared.isPlaying))
|
||||
.frame(width: 20, height: 16)
|
||||
}
|
||||
.frame(width: 20, height: 16)
|
||||
|
|
|
|||
|
|
@ -2615,6 +2615,20 @@ struct Media: View {
|
|||
Text("Media playback live activity")
|
||||
}
|
||||
|
||||
Section {
|
||||
Defaults.Toggle(key: .enableRealTimeWaveform) {
|
||||
HStack {
|
||||
Text("Enable real-time waveform")
|
||||
customBadge(text: "Beta")
|
||||
}
|
||||
}
|
||||
.settingsHighlight(id: highlightID("Enable real-time waveform"))
|
||||
} header: {
|
||||
Text("Music Visualizer")
|
||||
} footer: {
|
||||
Text("When enabled, the music visualizer displays real-time audio spectrum data synced to your music. Requires macOS 14.2+ and uses minimal CPU/GPU resources via the Accelerate framework.")
|
||||
}
|
||||
|
||||
Section {
|
||||
Defaults.Toggle(key: .enableLockScreenMediaWidget) {
|
||||
Text("Show lock screen media panel")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue