OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 16 matching lines...) Expand all Loading... |
27 */ | 27 */ |
28 | 28 |
29 #ifndef DynamicsCompressor_h | 29 #ifndef DynamicsCompressor_h |
30 #define DynamicsCompressor_h | 30 #define DynamicsCompressor_h |
31 | 31 |
32 #include "platform/audio/AudioArray.h" | 32 #include "platform/audio/AudioArray.h" |
33 #include "platform/audio/DynamicsCompressorKernel.h" | 33 #include "platform/audio/DynamicsCompressorKernel.h" |
34 #include "platform/audio/ZeroPole.h" | 34 #include "platform/audio/ZeroPole.h" |
35 #include "wtf/Allocator.h" | 35 #include "wtf/Allocator.h" |
36 #include "wtf/Noncopyable.h" | 36 #include "wtf/Noncopyable.h" |
37 #include <memory> | 37 #include "wtf/OwnPtr.h" |
38 | 38 |
39 namespace blink { | 39 namespace blink { |
40 | 40 |
41 class AudioBus; | 41 class AudioBus; |
42 | 42 |
43 // DynamicsCompressor implements a flexible audio dynamics compression effect su
ch as | 43 // DynamicsCompressor implements a flexible audio dynamics compression effect su
ch as |
44 // is commonly used in musical production and game audio. It lowers the volume | 44 // is commonly used in musical production and game audio. It lowers the volume |
45 // of the loudest parts of the signal and raises the volume of the softest parts
, | 45 // of the loudest parts of the signal and raises the volume of the softest parts
, |
46 // making the sound richer, fuller, and more controlled. | 46 // making the sound richer, fuller, and more controlled. |
47 | 47 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 float m_parameters[ParamLast]; | 91 float m_parameters[ParamLast]; |
92 void initializeParameters(); | 92 void initializeParameters(); |
93 | 93 |
94 float m_sampleRate; | 94 float m_sampleRate; |
95 | 95 |
96 // Emphasis filter controls. | 96 // Emphasis filter controls. |
97 float m_lastFilterStageRatio; | 97 float m_lastFilterStageRatio; |
98 float m_lastAnchor; | 98 float m_lastAnchor; |
99 float m_lastFilterStageGain; | 99 float m_lastFilterStageGain; |
100 | 100 |
101 std::unique_ptr<const float*[]> m_sourceChannels; | 101 OwnPtr<const float*[]> m_sourceChannels; |
102 std::unique_ptr<float*[]> m_destinationChannels; | 102 OwnPtr<float*[]> m_destinationChannels; |
103 | 103 |
104 // The core compressor. | 104 // The core compressor. |
105 DynamicsCompressorKernel m_compressor; | 105 DynamicsCompressorKernel m_compressor; |
106 }; | 106 }; |
107 | 107 |
108 } // namespace blink | 108 } // namespace blink |
109 | 109 |
110 #endif // DynamicsCompressor_h | 110 #endif // DynamicsCompressor_h |
OLD | NEW |