forked from alinebee/Boxer
-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f867a3c
commit 897f8ca
Showing
7 changed files
with
59 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
// | ||
// DummyMIDIDevice.swift | ||
// Boxer | ||
// | ||
// Created by C.W. Betts on 10/9/23. | ||
// Copyright © 2023 Alun Bestor and contributors. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
/// `DummyMIDIDevice` receives but ignores all MIDI events. | ||
/// It is used as a placeholder when MIDI is disabled. | ||
final class DummyMIDIDevice : NSObject, BXMIDIDevice { | ||
var volume: Float { | ||
get { | ||
return 0 | ||
} | ||
set { | ||
// do nothing | ||
} | ||
} | ||
|
||
var supportsMT32Music: Bool { | ||
return false | ||
} | ||
|
||
var supportsGeneralMIDIMusic: Bool { | ||
return false | ||
} | ||
|
||
var isProcessing: Bool { | ||
return false | ||
} | ||
|
||
var dateWhenReady: Date { | ||
return Date.distantPast | ||
} | ||
|
||
func handleMessage(_ message: Data) {} | ||
|
||
func handleSysex(_ message: Data) {} | ||
|
||
func pause() {} | ||
|
||
func resume() {} | ||
|
||
func close() {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters