Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,12 @@

- Removed deprecated `PluginRegistry.Registrar` usage in Android plugin to
resolve build errors on recent Flutter versions

## 1.1.12

- Deactivated iOS audio session on stop to restore output audio

## 1.1.13

- Reset iOS audio session to `.ambient` after stopping to fully release the
microphone and allow playback
11 changes: 10 additions & 1 deletion ios/Classes/AudioCapture.swift
Original file line number Diff line number Diff line change
Expand Up @@ -90,5 +90,14 @@ public class AudioCapture {
public func stopSession() {
audioEngine.inputNode.removeTap(onBus: 0)
audioEngine.stop()
let audioSession = AVAudioSession.sharedInstance()
do {
try audioSession.setActive(false, options: .notifyOthersOnDeactivation)
try audioSession.setCategory(.ambient, options: [.mixWithOthers])
try audioSession.setActive(true, options: .notifyOthersOnDeactivation)
print("✅ AudioSession desactivada y liberada correctamente")
} catch {
print("❌ Error al liberar AudioSession: \(error.localizedDescription)")
}
}
}
}
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flutter_audio_capture
description: Capture the audio buffer stream through microphone for iOS/Android.
version: 1.1.11
version: 1.1.13
homepage: https://github.com/ysak-y/flutter_audio_capture

environment:
Expand Down