- Rename application from MenuWhisper to Tell me with new domain com.fmartingr.tellme - Implement comprehensive preferences window with 6 tabs (General, Models, Text Insertion, Interface, Advanced, Permissions) - Add full English/Spanish localization for all UI elements - Create functional onboarding flow with model download capability - Implement preview dialog for transcription editing - Add settings export/import functionality - Fix HUD content display issues and add comprehensive permission checking - Enhance build scripts and app bundle creation for proper localization support
52 lines
No EOL
1.5 KiB
Swift
52 lines
No EOL
1.5 KiB
Swift
import Foundation
|
|
import AVFoundation
|
|
import AppKit
|
|
import CoreUtils
|
|
import CoreSettings
|
|
|
|
public class SoundManager: ObservableObject {
|
|
private let logger = Logger(category: "SoundManager")
|
|
private let settings: CoreSettings.Settings
|
|
|
|
private var startSound: AVAudioPlayer?
|
|
private var stopSound: AVAudioPlayer?
|
|
|
|
public init(settings: CoreSettings.Settings) {
|
|
self.settings = settings
|
|
setupSounds()
|
|
}
|
|
|
|
private func setupSounds() {
|
|
// Use system sounds for now
|
|
// In a future version, we could bundle custom sound files
|
|
setupSystemSounds()
|
|
}
|
|
|
|
private func setupSystemSounds() {
|
|
// We'll use NSSound for system sounds since AVAudioPlayer requires files
|
|
// These are just placeholders - in a real implementation we'd bundle sound files
|
|
logger.info("Sound manager initialized with system sounds")
|
|
}
|
|
|
|
public func playStartSound() {
|
|
guard settings.playSounds else { return }
|
|
|
|
logger.debug("Playing start sound")
|
|
// Use a subtle system sound for start
|
|
NSSound(named: "Glass")?.play()
|
|
}
|
|
|
|
public func playStopSound() {
|
|
guard settings.playSounds else { return }
|
|
|
|
logger.debug("Playing stop sound")
|
|
// Use a different system sound for stop
|
|
NSSound(named: "Blow")?.play()
|
|
}
|
|
|
|
public func playErrorSound() {
|
|
logger.debug("Playing error sound")
|
|
// Always play error sound regardless of settings
|
|
NSSound(named: "Funk")?.play()
|
|
}
|
|
} |