Renamed the RecordingService protocol in the Recording package target as Capturing.

This commit is contained in:
2026-07-04 13:41:56 +02:00
parent 69e30a9947
commit be130eb05f
8 changed files with 57 additions and 57 deletions
@@ -0,0 +1,25 @@
import Foundation
/// A service that captures audio from a microphone for the Recording feature.
///
/// ``RecordingView`` attaches the service to its model at initialization, so the audio capture can be swapped without touching the feature's
/// state machine for example, with a real microphone backend in the app, or with a mock in unit tests.
public protocol Capturing: Sendable {
// MARK: Methods
/// Starts a new audio recording from the microphone.
func start() async throws
/// Pauses the ongoing recording.
func pause() async throws
/// Resumes a paused recording.
func resume() async throws
/// Stops the recording.
///
/// - Returns: The audio captured since the recording started.
func stop() async throws -> Data
}