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:
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user