mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-23 03:32:32 +00:00
Minor factoring up: the audio queue is now pushed universally by MachineDocument
.
This commit is contained in:
parent
c773c3a66c
commit
50543e9676
@ -18,18 +18,21 @@ class ElectronDocument: MachineDocument {
|
||||
|
||||
override func windowControllerDidLoadNib(aController: NSWindowController) {
|
||||
super.windowControllerDidLoadNib(aController)
|
||||
self.intendedCyclesPerSecond = 2000000
|
||||
aController.window?.contentAspectRatio = NSSize(width: 11.0, height: 10.0)
|
||||
|
||||
self.intendedCyclesPerSecond = 2000000
|
||||
|
||||
if let osPath = NSBundle.mainBundle().pathForResource("os", ofType: "rom") {
|
||||
self.electron.setOSROM(NSData(contentsOfFile: osPath)!)
|
||||
}
|
||||
if let basicPath = NSBundle.mainBundle().pathForResource("basic", ofType: "rom") {
|
||||
self.electron.setBASICROM(NSData(contentsOfFile: basicPath)!)
|
||||
}
|
||||
|
||||
openGLView.performWithGLContext({
|
||||
self.electron.setView(self.openGLView, aspectRatio: 11.0 / 10.0)
|
||||
})
|
||||
self.electron.audioQueue = self.audioQueue
|
||||
|
||||
establishStoredOptions()
|
||||
}
|
||||
|
||||
|
@ -34,8 +34,11 @@ class MachineDocument: NSDocument, CSOpenGLViewDelegate, CSOpenGLViewResponderDe
|
||||
override func windowControllerDidLoadNib(aController: NSWindowController) {
|
||||
super.windowControllerDidLoadNib(aController)
|
||||
|
||||
// bind the content aspect ratio to remain 4:3 from now on
|
||||
// bind the content aspect ratio to remain 4:3 from now on as a default
|
||||
aController.window?.contentAspectRatio = NSSize(width: 4.0, height: 3.0)
|
||||
|
||||
// provide the audio queue
|
||||
self.machine().audioQueue = self.audioQueue
|
||||
}
|
||||
|
||||
override func close() {
|
||||
|
Loading…
Reference in New Issue
Block a user