Updated the Capturing procotol in the Recording package target to pass captured audio as a file URL instead of data.

This commit is contained in:
2026-07-04 15:06:55 +02:00
parent 2fe240de1a
commit 6a0e7698a5
10 changed files with 116 additions and 119 deletions
@@ -19,9 +19,20 @@ struct DummyCapturing: Capturing {
/// Simulates the stop of a recording.
///
/// - Returns: An empty audio payload.
func stop() async throws -> Data {
.init()
/// - Returns: The location of a dummy audio file, which is never actually created.
func stop() async throws -> URL {
FileManager.default.temporaryDirectory.appending(path: Constant.File.name)
}
}
// MARK: - Constants
/// The constant values used across the recording services.
private enum Constant {
/// The file constants.
enum File {
/// The name of the dummy audio file.
static let name = "dummy.m4a"
}
}