summaryrefslogtreecommitdiff
path: root/macosx/plugins/DFSound/macsrc
diff options
context:
space:
mode:
authorSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2011-02-22 02:03:02 +0000
committerSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2011-02-22 02:03:02 +0000
commite306359cc457dfbe5200e6485596e9c9901aae19 (patch)
tree543cf1b6b929badfaddaf027da29dd91fc6611e9 /macosx/plugins/DFSound/macsrc
parent41d8ea06cf6d8f09d910bbe6727c3c9b4adf6c01 (diff)
downloadpcsxr-e306359cc457dfbe5200e6485596e9c9901aae19.tar.gz
-dfsound (macosx): added volume adjustment/muting support.
-peopsxgl (macosx): removed powerpc from deployment configuration as the plugin is not big-endian compatible. git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@63687 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx/plugins/DFSound/macsrc')
-rw-r--r--macosx/plugins/DFSound/macsrc/NamedSlider.m4
-rw-r--r--macosx/plugins/DFSound/macsrc/PluginController.h5
-rw-r--r--macosx/plugins/DFSound/macsrc/PluginController.m34
3 files changed, 28 insertions, 15 deletions
diff --git a/macosx/plugins/DFSound/macsrc/NamedSlider.m b/macosx/plugins/DFSound/macsrc/NamedSlider.m
index fd07780a..0196a168 100644
--- a/macosx/plugins/DFSound/macsrc/NamedSlider.m
+++ b/macosx/plugins/DFSound/macsrc/NamedSlider.m
@@ -17,10 +17,10 @@
- (NSString *)stringValue
{
int index = [self intValue];
-
+
if (index >= 0 && index < [strings count])
return [strings objectAtIndex:index];
-
+
return @"(Unknown)";
}
diff --git a/macosx/plugins/DFSound/macsrc/PluginController.h b/macosx/plugins/DFSound/macsrc/PluginController.h
index 36373b1d..804108c5 100644
--- a/macosx/plugins/DFSound/macsrc/PluginController.h
+++ b/macosx/plugins/DFSound/macsrc/PluginController.h
@@ -18,8 +18,9 @@ void LoadConfiguration();
IBOutlet NetSfPeopsSPUPluginNamedSlider *reverbValue;
IBOutlet NSControl *xaEnableBox;
IBOutlet NSControl *xaSpeedBox;
-
- NSMutableDictionary *keyValues;
+ IBOutlet NetSfPeopsSPUPluginNamedSlider *volumeValue;
+
+ NSMutableDictionary *keyValues;
}
- (IBAction)cancel:(id)sender;
- (IBAction)ok:(id)sender;
diff --git a/macosx/plugins/DFSound/macsrc/PluginController.m b/macosx/plugins/DFSound/macsrc/PluginController.m
index ec671f70..19b30134 100644
--- a/macosx/plugins/DFSound/macsrc/PluginController.m
+++ b/macosx/plugins/DFSound/macsrc/PluginController.m
@@ -48,13 +48,13 @@ long DoConfiguration()
pluginController = [[PluginController alloc] initWithWindowNibName:@"NetSfPeopsSpuPluginMain"];
}
window = [pluginController window];
-
+
/* load values */
[pluginController loadValues];
-
+
[window center];
[window makeKeyAndOrderFront:nil];
-
+
return 0;
}
@@ -69,6 +69,7 @@ void ReadConfig(void)
[NSNumber numberWithBool:NO], @"XA Pitch",
[NSNumber numberWithInt:0], @"Interpolation Quality",
[NSNumber numberWithInt:1], @"Reverb Quality",
+ [NSNumber numberWithInt:3], @"Volume",
nil], PrefsKey,
nil]];
@@ -82,7 +83,7 @@ void ReadConfig(void)
iUseInterpolation = [[keyValues objectForKey:@"Interpolation Quality"] intValue];
iUseReverb = [[keyValues objectForKey:@"Reverb Quality"] intValue];
- iVolume=1;
+ iVolume = 5 - [[keyValues objectForKey:@"Volume"] intValue];
}
@implementation PluginController
@@ -95,7 +96,7 @@ void ReadConfig(void)
- (IBAction)ok:(id)sender
{
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
-
+
NSMutableDictionary *writeDic = [NSMutableDictionary dictionaryWithDictionary:keyValues];
[writeDic setObject:[NSNumber numberWithInt:[hiCompBox intValue]] forKey:@"High Compatibility Mode"];
[writeDic setObject:[NSNumber numberWithInt:[irqWaitBox intValue]] forKey:@"SPU IRQ Wait"];
@@ -104,14 +105,16 @@ void ReadConfig(void)
[writeDic setObject:[NSNumber numberWithInt:[interpolValue intValue]] forKey:@"Interpolation Quality"];
[writeDic setObject:[NSNumber numberWithInt:[reverbValue intValue]] forKey:@"Reverb Quality"];
-
+
+ [writeDic setObject:[NSNumber numberWithInt:[volumeValue intValue]] forKey:@"Volume"];
+
// write to defaults
[defaults setObject:writeDic forKey:PrefsKey];
[defaults synchronize];
-
+
// and set global values accordingly
ReadConfig();
-
+
[self close];
}
@@ -125,13 +128,13 @@ void ReadConfig(void)
- (void)loadValues
{
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
-
+
ReadConfig();
-
+
/* load from preferences */
[keyValues release];
keyValues = [[defaults dictionaryForKey:PrefsKey] retain];
-
+
[hiCompBox setIntValue:[[keyValues objectForKey:@"High Compatibility Mode"] intValue]];
[irqWaitBox setIntValue:[[keyValues objectForKey:@"SPU IRQ Wait"] intValue]];
[monoSoundBox setIntValue:[[keyValues objectForKey:@"Mono Sound Output"] intValue]];
@@ -139,6 +142,7 @@ void ReadConfig(void)
[interpolValue setIntValue:[[keyValues objectForKey:@"Interpolation Quality"] intValue]];
[reverbValue setIntValue:[[keyValues objectForKey:@"Reverb Quality"] intValue]];
+ [volumeValue setIntValue:[[keyValues objectForKey:@"Volume"] intValue]];
}
- (void)awakeFromNib
@@ -155,6 +159,14 @@ void ReadConfig(void)
@"(Simple Reverb)",
@"(PSX Reverb)",
nil]];
+
+ [volumeValue setStrings:[NSArray arrayWithObjects:
+ @"(Muted)",
+ @"(Low)",
+ @"(Medium)",
+ @"(Loud)",
+ @"(Loudest)",
+ nil]];
}
@end