3
OODebugSoundInspector.m
7
Copyright (C) 2010 Jens Ayton
9
Permission is hereby granted, free of charge, to any person obtaining a copy
10
of this software and associated documentation files (the "Software"), to deal
11
in the Software without restriction, including without limitation the rights
12
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
copies of the Software, and to permit persons to whom the Software is
14
furnished to do so, subject to the following conditions:
16
The above copyright notice and this permission notice shall be included in all
17
copies or substantial portions of the Software.
19
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
30
#import "OODebugSoundInspector.h"
32
#import <Cocoa/Cocoa.h>
35
@implementation OODebugSoundInspector
39
if ((self = [super init]))
41
if (![NSBundle loadNibNamed:@"OODebugSoundInspector" owner:self])
43
OOLog(@"debugOXP.load.soundInspector.failed", @"Failed to load sound inspector nib.");
46
else OOSoundRegisterDebugMonitor(self);
53
- (void) soundDebugMonitorNoteChannelMaxCount:(OOUInteger)maxChannels
59
- (void) soundDebugMonitorNoteActiveChannelCount:(OOUInteger)usedChannels
61
[_currentField setIntValue:usedChannels];
62
if (usedChannels > _channelCountHighWaterMark)
64
_channelCountHighWaterMark = usedChannels;
65
[_maxField setIntValue:usedChannels];
70
- (void) soundDebugMonitorNoteState:(OOCASoundDebugMonitorChannelState)state ofChannel:(OOUInteger)channel
72
[[_checkBoxes cellWithTag:channel] setIntValue:state];
76
- (void) soundDebugMonitorNoteAUGraphLoad:(float)load
78
[_loadBar setFloatValue:load * 100.0f];
79
if (load > _loadHighWaterMark)
81
_loadHighWaterMark = load;
86
- (IBAction) show:(id)sender
88
[_inspectorWindow makeKeyAndOrderFront:sender];