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 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 30 matching lines...) Expand all Loading... |
41 // when the gain value is changed dynamically. | 41 // when the gain value is changed dynamically. |
42 | 42 |
43 class GainHandler final : public AudioHandler { | 43 class GainHandler final : public AudioHandler { |
44 public: | 44 public: |
45 static PassRefPtr<GainHandler> create(AudioNode&, | 45 static PassRefPtr<GainHandler> create(AudioNode&, |
46 float sampleRate, | 46 float sampleRate, |
47 AudioParamHandler& gain); | 47 AudioParamHandler& gain); |
48 | 48 |
49 // AudioHandler | 49 // AudioHandler |
50 void process(size_t framesToProcess) override; | 50 void process(size_t framesToProcess) override; |
| 51 void processOnlyAudioParams(size_t framesToProcess) override; |
51 | 52 |
52 // Called in the main thread when the number of channels for the input may | 53 // Called in the main thread when the number of channels for the input may |
53 // have changed. | 54 // have changed. |
54 void checkNumberOfChannelsForInput(AudioNodeInput*) override; | 55 void checkNumberOfChannelsForInput(AudioNodeInput*) override; |
55 | 56 |
56 private: | 57 private: |
57 GainHandler(AudioNode&, float sampleRate, AudioParamHandler& gain); | 58 GainHandler(AudioNode&, float sampleRate, AudioParamHandler& gain); |
58 | 59 |
59 float m_lastGain; // for de-zippering | 60 float m_lastGain; // for de-zippering |
60 RefPtr<AudioParamHandler> m_gain; | 61 RefPtr<AudioParamHandler> m_gain; |
(...skipping 15 matching lines...) Expand all Loading... |
76 | 77 |
77 private: | 78 private: |
78 GainNode(BaseAudioContext&); | 79 GainNode(BaseAudioContext&); |
79 | 80 |
80 Member<AudioParam> m_gain; | 81 Member<AudioParam> m_gain; |
81 }; | 82 }; |
82 | 83 |
83 } // namespace blink | 84 } // namespace blink |
84 | 85 |
85 #endif // GainNode_h | 86 #endif // GainNode_h |
OLD | NEW |