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 17 matching lines...) Expand all Loading... |
28 | 28 |
29 #ifndef SincResampler_h | 29 #ifndef SincResampler_h |
30 #define SincResampler_h | 30 #define SincResampler_h |
31 | 31 |
32 #include "platform/PlatformExport.h" | 32 #include "platform/PlatformExport.h" |
33 #include "platform/audio/AudioArray.h" | 33 #include "platform/audio/AudioArray.h" |
34 #include "platform/audio/AudioSourceProvider.h" | 34 #include "platform/audio/AudioSourceProvider.h" |
35 #include "wtf/Allocator.h" | 35 #include "wtf/Allocator.h" |
36 #include "wtf/Noncopyable.h" | 36 #include "wtf/Noncopyable.h" |
37 | 37 |
38 #if ENABLE(WEB_AUDIO) | |
39 | |
40 namespace blink { | 38 namespace blink { |
41 | 39 |
42 // SincResampler is a high-quality sample-rate converter. | 40 // SincResampler is a high-quality sample-rate converter. |
43 | 41 |
44 class PLATFORM_EXPORT SincResampler { | 42 class PLATFORM_EXPORT SincResampler { |
45 USING_FAST_MALLOC(SincResampler); | 43 USING_FAST_MALLOC(SincResampler); |
46 WTF_MAKE_NONCOPYABLE(SincResampler); | 44 WTF_MAKE_NONCOPYABLE(SincResampler); |
47 public: | 45 public: |
48 // scaleFactor == sourceSampleRate / destinationSampleRate | 46 // scaleFactor == sourceSampleRate / destinationSampleRate |
49 // kernelSize can be adjusted for quality (higher is better) | 47 // kernelSize can be adjusted for quality (higher is better) |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 | 81 |
84 // m_sourceProvider is used to provide the audio input stream to the resampl
er. | 82 // m_sourceProvider is used to provide the audio input stream to the resampl
er. |
85 AudioSourceProvider* m_sourceProvider; | 83 AudioSourceProvider* m_sourceProvider; |
86 | 84 |
87 // The buffer is primed once at the very beginning of processing. | 85 // The buffer is primed once at the very beginning of processing. |
88 bool m_isBufferPrimed; | 86 bool m_isBufferPrimed; |
89 }; | 87 }; |
90 | 88 |
91 } // namespace blink | 89 } // namespace blink |
92 | 90 |
93 #endif // ENABLE(WEB_AUDIO) | |
94 | |
95 #endif // SincResampler_h | 91 #endif // SincResampler_h |
OLD | NEW |