Skip to content

feat: ✨ Add macOS support#468

Merged
ujas-m-simformsolutions merged 1 commit intomainfrom
feat/add-macos-support
Jan 12, 2026
Merged

feat: ✨ Add macOS support#468
ujas-m-simformsolutions merged 1 commit intomainfrom
feat/add-macos-support

Conversation

@vasu-nageshri
Copy link
Copy Markdown
Contributor

Description

This PR extends the audio waveform plugin to support macOS by implementing required platform-specific integrations and fixes.

Checklist

  • The title of my PR starts with a Conventional Commit prefix (fix:, feat:, docs: etc).
  • I have followed the Contributor Guide when preparing my PR.
  • I have updated/added tests for ALL new/updated/fixed functionality.
  • I have updated/added relevant documentation in docs and added dartdoc comments with ///.
  • I have updated/added relevant examples in examples or docs.

Breaking Change?

  • Yes, this PR is a breaking change.
  • No, this PR is not a breaking change.

Related Issues

@vasu-nageshri vasu-nageshri force-pushed the feat/add-macos-support branch 4 times, most recently from d4d3e64 to 98b084e Compare January 5, 2026 07:33
@vasu-nageshri vasu-nageshri marked this pull request as ready for review January 5, 2026 09:23
@vasu-nageshri vasu-nageshri force-pushed the feat/add-macos-support branch 2 times, most recently from d3d9286 to 5cf826c Compare January 5, 2026 09:27
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread CHANGELOG.md Outdated
Comment thread doc/documentation.md Outdated
Comment thread doc/documentation.md Outdated
Comment thread example/macos/.gitignore
Comment thread example/macos/Podfile
Comment thread macos/Classes/AudioRecorder.swift Outdated
Comment thread macos/Classes/AudioRecorder.swift Outdated
Comment thread macos/Classes/AudioRecorder.swift Outdated
Comment thread macos/Classes/AudioRecorder.swift
Comment thread macos/Classes/SwiftAudioWaveformsPlugin.swift Outdated
@vasu-nageshri vasu-nageshri force-pushed the feat/add-macos-support branch 2 times, most recently from 3738452 to 2c4911f Compare January 8, 2026 08:04
@vasu-nageshri vasu-nageshri changed the title feat: ✨ Add macOS support for audio recording and waveform visualization feat: ✨ Add macOS support Jan 8, 2026
@vasu-nageshri vasu-nageshri force-pushed the feat/add-macos-support branch from 2c4911f to d9b1372 Compare January 8, 2026 08:05
Comment thread example/macos/Runner.xcodeproj/project.pbxproj Outdated
Comment thread example/macos/Runner.xcodeproj/project.pbxproj Outdated
Comment thread macos/.gitignore Outdated
Comment thread macos/Classes/AudioRecorder.swift
Comment thread macos/Classes/AudioRecorder.swift
Comment thread macos/Classes/RecorderBytesStreamEngine.swift Outdated
Comment thread macos/Classes/RecorderBytesStreamEngine.swift Outdated
Comment thread macos/Classes/RecordingSettings.swift Outdated
// RecordingSettings.swift
// audio_waveforms
//
// Created by Manoj Padiya on 30/12/24.
Copy link
Copy Markdown
Collaborator

@ujas-m-simformsolutions ujas-m-simformsolutions Jan 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not changed

Comment thread macos/Classes/WaveformExtractor.swift Outdated
Comment thread macos/Classes/WaveformExtractor.swift Outdated
@vasu-nageshri vasu-nageshri force-pushed the feat/add-macos-support branch 2 times, most recently from c2e67ef to 3738848 Compare January 9, 2026 08:23
Comment thread example/lib/main.dart Outdated
Future<void> _init() async {
recorderController = RecorderController();
recorderController.onAudioChunks.listen((event) {
print('event $event');
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove print

Comment thread macos/Classes/AudioBufferProcessor.swift Outdated
Comment thread macos/Classes/AudioBufferProcessor.swift Outdated
Comment thread macos/Classes/AudioRecorder.swift Outdated
Comment on lines +7 to +15
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?
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

most of these can be private

Comment thread macos/Classes/AudioRecorder.swift
@vasu-nageshri vasu-nageshri force-pushed the feat/add-macos-support branch from 3738848 to d24f0e8 Compare January 9, 2026 09:46
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread macos/Classes/AudioPlayer.swift Outdated
Comment thread macos/Classes/SwiftAudioWaveformsPlugin.swift Outdated
Comment thread macos/Classes/AudioRecorder.swift Outdated
Comment thread macos/Classes/SwiftAudioWaveformsPlugin.swift Outdated
@vasu-nageshri vasu-nageshri force-pushed the feat/add-macos-support branch from 18bdb13 to ecaf609 Compare January 9, 2026 10:03
@ujas-m-simformsolutions ujas-m-simformsolutions merged commit 5c10355 into main Jan 12, 2026
@ujas-m-simformsolutions ujas-m-simformsolutions deleted the feat/add-macos-support branch January 12, 2026 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants