| 194 | } |
| 195 | |
| 196 | HRESULT FeedbackXBOBT::SetProperty(FFProperty property, void *value) |
| 197 | { |
| 198 | if(property != FFPROP_FFGAIN) { |
| 199 | return FFERR_UNSUPPORTED; |
| 200 | } |
| 201 | |
| 202 | UInt32 NewGain = *((UInt32*)value); |
| 203 | __block HRESULT Result = FF_OK; |
| 204 | |
| 205 | dispatch_sync(Queue, ^{ |
| 206 | if (1 <= NewGain && NewGain <= 10000) |
| 207 | { |
| 208 | Gain = NewGain; |
| 209 | } else { |
| 210 | Gain = max((UInt32)1, min(NewGain, (UInt32)10000)); |
| 211 | Result = FF_TRUNCATED; |
| 212 | } |
| 213 | }); |
| 214 | |
| 215 | return Result; |
| 216 | } |
| 217 | |
| 218 | HRESULT FeedbackXBOBT::StartEffect(FFEffectDownloadID EffectHandle, FFEffectStartFlag Mode, UInt32 Count) |
| 219 | { |