| 177 | } |
| 178 | |
| 179 | HRESULT Feedback360::SetProperty(FFProperty property, void *value) |
| 180 | { |
| 181 | if(property != FFPROP_FFGAIN) { |
| 182 | return FFERR_UNSUPPORTED; |
| 183 | } |
| 184 | |
| 185 | UInt32 NewGain = *((UInt32*)value); |
| 186 | __block HRESULT Result = FF_OK; |
| 187 | |
| 188 | dispatch_sync(Queue, ^{ |
| 189 | if (1 <= NewGain && NewGain <= 10000) |
| 190 | { |
| 191 | Gain = NewGain; |
| 192 | } else { |
| 193 | Gain = max((UInt32)1, min(NewGain, (UInt32)10000)); |
| 194 | Result = FF_TRUNCATED; |
| 195 | } |
| 196 | }); |
| 197 | |
| 198 | return Result; |
| 199 | } |
| 200 | |
| 201 | HRESULT Feedback360::StartEffect(FFEffectDownloadID EffectHandle, FFEffectStartFlag Mode, UInt32 Count) |
| 202 | { |