34 lines
792 B
Swift
34 lines
792 B
Swift
//
|
|
// AudioConstants.swift
|
|
// TheNoiseClock
|
|
//
|
|
// Created by Matt Bruce on 9/7/25.
|
|
//
|
|
|
|
import Foundation
|
|
import AVFAudio
|
|
|
|
/// Audio-related constants and configuration
|
|
enum AudioConstants {
|
|
|
|
// MARK: - Audio Session Configuration
|
|
enum AudioSession {
|
|
static let category = AVAudioSession.Category.playback
|
|
static let mode = AVAudioSession.Mode.default
|
|
static let options: AVAudioSession.CategoryOptions = [.mixWithOthers]
|
|
}
|
|
|
|
// MARK: - Playback Settings
|
|
enum Playback {
|
|
static let numberOfLoops = -1 // Infinite loop
|
|
static let prepareToPlay = true
|
|
}
|
|
|
|
// MARK: - Volume
|
|
enum Volume {
|
|
static let min: Float = 0.0
|
|
static let max: Float = 1.0
|
|
static let `default`: Float = 0.8
|
|
}
|
|
}
|