feat: ✨ Add macOS support#468
Conversation
d4d3e64 to
98b084e
Compare
d3d9286 to
5cf826c
Compare
There was a problem hiding this comment.
Pull request overview
This PR adds comprehensive macOS support to the audio_waveforms plugin, enabling audio recording, playback, and waveform visualization on macOS desktop applications. The implementation mirrors the iOS architecture using Swift and AVFoundation, with platform-specific adaptations for macOS.
- Implements complete macOS platform support using Swift and AVFoundation APIs
- Adds macOS-specific Swift classes for recording, playback, and waveform extraction
- Updates Flutter interface code to handle macOS platform alongside iOS
- Includes proper entitlements, permissions, and Podfile configuration for macOS
Reviewed changes
Copilot reviewed 41 out of 49 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
pubspec.yaml |
Registers macOS plugin class |
macos/audio_waveforms.podspec |
Pod specification for macOS with minimum version 10.14 |
macos/Classes/SwiftAudioWaveformsPlugin.swift |
Main plugin entry point handling method calls |
macos/Classes/AudioRecorder.swift |
Audio recording implementation using AVAudioEngine |
macos/Classes/AudioPlayer.swift |
Audio playback using AVAudioPlayer |
macos/Classes/WaveformExtractor.swift |
Waveform data extraction from audio files |
macos/Classes/RecorderBytesStreamEngine.swift |
Real-time audio byte streaming |
macos/Classes/RecordingSettings.swift |
Recording configuration struct |
macos/Classes/Utils.swift |
Constants and utility types |
lib/src/controllers/recorder_controller.dart |
Added macOS platform check |
lib/src/base/audio_waveforms_interface.dart |
Added macOS to iOS platform check |
lib/src/base/constants.dart |
Removed unused useLegacyNormalization constant |
lib/src/models/recorder_settings.dart |
Removed useLegacyNormalization parameter |
doc/documentation.md |
Added macOS setup instructions and platform support section |
CHANGELOG.md |
Added entry for macOS support feature |
example/macos/* |
Complete macOS example app configuration |
Files not reviewed (1)
- example/macos/Runner.xcworkspace/contents.xcworkspacedata: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
3738452 to
2c4911f
Compare
2c4911f to
d9b1372
Compare
| // RecordingSettings.swift | ||
| // audio_waveforms | ||
| // | ||
| // Created by Manoj Padiya on 30/12/24. |
There was a problem hiding this comment.
This is not changed
c2e67ef to
3738848
Compare
| Future<void> _init() async { | ||
| recorderController = RecorderController(); | ||
| recorderController.onAudioChunks.listen((event) { | ||
| print('event $event'); |
There was a problem hiding this comment.
remove print
| var audioEngine: AVAudioEngine? | ||
| var audioFile: AVAudioFile? | ||
| var audioConverter: AVAudioConverter? | ||
| var path: String? | ||
| var audioUrl: URL? | ||
| var recordedDuration: CMTime = CMTime.zero | ||
| var flutterChannel: FlutterMethodChannel | ||
| var isPaused: Bool = false | ||
| var recordingSettings: RecordingSettings? |
There was a problem hiding this comment.
most of these can be private
3738848 to
d24f0e8
Compare
d24f0e8 to
18bdb13
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 39 out of 47 changed files in this pull request and generated 4 comments.
Files not reviewed (1)
- example/macos/Runner.xcworkspace/contents.xcworkspacedata: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
18bdb13 to
ecaf609
Compare
Description
This PR extends the audio waveform plugin to support macOS by implementing required platform-specific integrations and fixes.
Checklist
fix:,feat:,docs:etc).docsand added dartdoc comments with///.examplesordocs.Breaking Change?
Related Issues