| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 size_t end_frame = start_frame + number_of_values; | 282 size_t end_frame = start_frame + number_of_values; |
| 283 | 283 |
| 284 // Note we're running control rate at the sample-rate. | 284 // Note we're running control rate at the sample-rate. |
| 285 // Pass in the current value as default value. | 285 // Pass in the current value as default value. |
| 286 SetIntrinsicValue(timeline_.ValuesForFrameRange( | 286 SetIntrinsicValue(timeline_.ValuesForFrameRange( |
| 287 start_frame, end_frame, IntrinsicValue(), values, number_of_values, | 287 start_frame, end_frame, IntrinsicValue(), values, number_of_values, |
| 288 sample_rate, sample_rate, MinValue(), MaxValue())); | 288 sample_rate, sample_rate, MinValue(), MaxValue())); |
| 289 } | 289 } |
| 290 | 290 |
| 291 void AudioParamHandler::Connect(AudioNodeOutput& output) { | 291 void AudioParamHandler::Connect(AudioNodeOutput& output) { |
| 292 ASSERT(GetDeferredTaskHandler().IsGraphOwner()); | 292 DCHECK(GetDeferredTaskHandler().IsGraphOwner()); |
| 293 | 293 |
| 294 if (outputs_.Contains(&output)) | 294 if (outputs_.Contains(&output)) |
| 295 return; | 295 return; |
| 296 | 296 |
| 297 output.AddParam(*this); | 297 output.AddParam(*this); |
| 298 outputs_.insert(&output); | 298 outputs_.insert(&output); |
| 299 ChangedOutputs(); | 299 ChangedOutputs(); |
| 300 } | 300 } |
| 301 | 301 |
| 302 void AudioParamHandler::Disconnect(AudioNodeOutput& output) { | 302 void AudioParamHandler::Disconnect(AudioNodeOutput& output) { |
| 303 ASSERT(GetDeferredTaskHandler().IsGraphOwner()); | 303 DCHECK(GetDeferredTaskHandler().IsGraphOwner()); |
| 304 | 304 |
| 305 if (outputs_.Contains(&output)) { | 305 if (outputs_.Contains(&output)) { |
| 306 outputs_.erase(&output); | 306 outputs_.erase(&output); |
| 307 ChangedOutputs(); | 307 ChangedOutputs(); |
| 308 output.RemoveParam(*this); | 308 output.RemoveParam(*this); |
| 309 } | 309 } |
| 310 } | 310 } |
| 311 | 311 |
| 312 int AudioParamHandler::ComputeQHistogramValue(float new_value) const { | 312 int AudioParamHandler::ComputeQHistogramValue(float new_value) const { |
| 313 // For the Q value, assume a useful range is [0, 25] and that 0.25 dB | 313 // For the Q value, assume a useful range is [0, 25] and that 0.25 dB |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 519 return this; | 519 return this; |
| 520 } | 520 } |
| 521 | 521 |
| 522 AudioParam* AudioParam::cancelAndHoldAtTime(double start_time, | 522 AudioParam* AudioParam::cancelAndHoldAtTime(double start_time, |
| 523 ExceptionState& exception_state) { | 523 ExceptionState& exception_state) { |
| 524 Handler().Timeline().CancelAndHoldAtTime(start_time, exception_state); | 524 Handler().Timeline().CancelAndHoldAtTime(start_time, exception_state); |
| 525 return this; | 525 return this; |
| 526 } | 526 } |
| 527 | 527 |
| 528 } // namespace blink | 528 } // namespace blink |
| OLD | NEW |