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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 28 matching lines...) Expand all Loading... |
39 | 39 |
40 class PLATFORM_EXPORT AudioDSPKernel { | 40 class PLATFORM_EXPORT AudioDSPKernel { |
41 public: | 41 public: |
42 AudioDSPKernel(AudioDSPKernelProcessor* kernelProcessor) | 42 AudioDSPKernel(AudioDSPKernelProcessor* kernelProcessor) |
43 : m_kernelProcessor(kernelProcessor) | 43 : m_kernelProcessor(kernelProcessor) |
44 , m_sampleRate(kernelProcessor->sampleRate()) | 44 , m_sampleRate(kernelProcessor->sampleRate()) |
45 { | 45 { |
46 } | 46 } |
47 | 47 |
48 AudioDSPKernel(float sampleRate) | 48 AudioDSPKernel(float sampleRate) |
49 : m_kernelProcessor(0) | 49 : m_kernelProcessor(nullptr) |
50 , m_sampleRate(sampleRate) | 50 , m_sampleRate(sampleRate) |
51 { | 51 { |
52 } | 52 } |
53 | 53 |
54 virtual ~AudioDSPKernel(); | 54 virtual ~AudioDSPKernel(); |
55 | 55 |
56 // Subclasses must override process() to do the processing and reset() to re
set DSP state. | 56 // Subclasses must override process() to do the processing and reset() to re
set DSP state. |
57 virtual void process(const float* source, float* destination, size_t framesT
oProcess) = 0; | 57 virtual void process(const float* source, float* destination, size_t framesT
oProcess) = 0; |
58 virtual void reset() = 0; | 58 virtual void reset() = 0; |
59 | 59 |
(...skipping 14 matching lines...) Expand all Loading... |
74 // do that because AudioDSPKernel can be allocated in audio threads | 74 // do that because AudioDSPKernel can be allocated in audio threads |
75 // (which are not registered to Oilpan). | 75 // (which are not registered to Oilpan). |
76 GC_PLUGIN_IGNORE("http://crbug.com/404578") | 76 GC_PLUGIN_IGNORE("http://crbug.com/404578") |
77 AudioDSPKernelProcessor* m_kernelProcessor; | 77 AudioDSPKernelProcessor* m_kernelProcessor; |
78 float m_sampleRate; | 78 float m_sampleRate; |
79 }; | 79 }; |
80 | 80 |
81 } // namespace blink | 81 } // namespace blink |
82 | 82 |
83 #endif // AudioDSPKernel_h | 83 #endif // AudioDSPKernel_h |
OLD | NEW |