diff options
author | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2010-06-06 08:29:04 +0000 |
---|---|---|
committer | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2010-06-06 08:29:04 +0000 |
commit | 30454df1f1b18fc672daf2f5498691266040fbca (patch) | |
tree | f4c14a023f9feb15ca80027e419dfc2221b0b783 /src/base/UIni.pas | |
parent | d35ae3cd792d22766f56c8210781148c36c9ae62 (diff) | |
download | usdx-30454df1f1b18fc672daf2f5498691266040fbca.tar.gz usdx-30454df1f1b18fc672daf2f5498691266040fbca.tar.xz usdx-30454df1f1b18fc672daf2f5498691266040fbca.zip |
- cleanup
- added comments
- added CHANNEL_OFF (=0) for ChannelToPlayerMap
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2448 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'src/base/UIni.pas')
-rw-r--r-- | src/base/UIni.pas | 44 |
1 files changed, 24 insertions, 20 deletions
diff --git a/src/base/UIni.pas b/src/base/UIni.pas index a4c85a3b..d7676f51 100644 --- a/src/base/UIni.pas +++ b/src/base/UIni.pas @@ -44,31 +44,34 @@ uses UPath; type - // TInputDeviceConfig stores the configuration for an input device. - // Configurations will be stored in the InputDeviceConfig array. - // Note that not all devices listed in InputDeviceConfig are active devices. - // Some might be unplugged and hence unavailable. - // Available devices are held in TAudioInputProcessor.DeviceList. Each - // TAudioInputDevice listed there has a CfgIndex field which is the index to - // its configuration in the InputDeviceConfig array. - // Name: - // the name of the input device - // Input: - // the index of the input source to use for recording - // ChannelToPlayerMap: - // mapping of recording channels to players, e.g. ChannelToPlayerMap[0] = 2 - // maps the channel 0 (left) to player 2. A player index of 0 means that - // the channel is not assigned to a player. + {** + * TInputDeviceConfig stores the configuration for an input device. + * Configurations will be stored in the InputDeviceConfig array. + * Note that not all devices listed in InputDeviceConfig are active devices. + * Some might be unplugged and hence unavailable. + * Available devices are held in TAudioInputProcessor.DeviceList. Each + * TAudioInputDevice listed there has a CfgIndex field which is the index to + * its configuration in the InputDeviceConfig array. + *} PInputDeviceConfig = ^TInputDeviceConfig; TInputDeviceConfig = record - Name: string; - Input: integer; - Latency: integer; //**< latency in ms, or LATENCY_AUTODETECT for default + Name: string; //**< Name of the input device + Input: integer; //**< Index of the input source to use for recording + Latency: integer; //**< Latency in ms, or LATENCY_AUTODETECT for default + + {** + * Mapping of recording channels to players, e.g. ChannelToPlayerMap[0] = 2 + * maps the channel 0 (left) to player 2. + * A player index of 0 (CHANNEL_OFF) means that the channel is not assigned + * to any player (the channel is off). + *} ChannelToPlayerMap: array of integer; end; +{* Constants for TInputDeviceConfig *} const - LATENCY_AUTODETECT = -1; + CHANNEL_OFF = 0; // for field ChannelToPlayerMap + LATENCY_AUTODETECT = -1; // for field Latency type @@ -87,6 +90,7 @@ type procedure LoadInputDeviceCfg(IniFile: TMemIniFile); procedure SaveInputDeviceCfg(IniFile: TIniFile); procedure LoadThemes(IniFile: TCustomIniFile); + procedure LoadPaths(IniFile: TCustomIniFile); procedure LoadScreenModes(IniFile: TCustomIniFile); @@ -658,7 +662,7 @@ begin for ChannelIndex := 0 to High(DeviceCfg.ChannelToPlayerMap) do begin DeviceCfg.ChannelToPlayerMap[ChannelIndex] := - IniFile.ReadInteger('Record', Format('Channel%d[%d]', [ChannelIndex+1, DeviceIndex]), 0); + IniFile.ReadInteger('Record', Format('Channel%d[%d]', [ChannelIndex+1, DeviceIndex]), CHANNEL_OFF); end; end; end; |