Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(213)

Side by Side Diff: Source/platform/audio/Reverb.h

Issue 1214463003: Split "Online" and "Offline" AudioContext processing (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 27 matching lines...) Expand all
38 class AudioBus; 38 class AudioBus;
39 39
40 // Multi-channel convolution reverb with channel matrixing - one or more ReverbC onvolver objects are used internally. 40 // Multi-channel convolution reverb with channel matrixing - one or more ReverbC onvolver objects are used internally.
41 41
42 class PLATFORM_EXPORT Reverb { 42 class PLATFORM_EXPORT Reverb {
43 WTF_MAKE_NONCOPYABLE(Reverb); 43 WTF_MAKE_NONCOPYABLE(Reverb);
44 public: 44 public:
45 enum { MaxFrameSize = 256 }; 45 enum { MaxFrameSize = 256 };
46 46
47 // renderSliceSize is a rendering hint, so the FFTs can be optimized to not all occur at the same time (very bad when rendering on a real-time thread). 47 // renderSliceSize is a rendering hint, so the FFTs can be optimized to not all occur at the same time (very bad when rendering on a real-time thread).
48 Reverb(AudioBus* impulseResponseBuffer, size_t renderSliceSize, size_t maxFF TSize, size_t numberOfChannels, bool useBackgroundThreads, bool normalize); 48 Reverb(AudioBus* impulseResponseBuffer, size_t renderSliceSize, size_t maxFF TSize, size_t numberOfChannels, bool hasRealtimeConstraint, bool normalize);
Raymond Toy 2015/06/27 15:38:11 DBC: I think useBackgroundThreads is clearer than
49 49
50 void process(const AudioBus* sourceBus, AudioBus* destinationBus, size_t fra mesToProcess); 50 void process(const AudioBus* sourceBus, AudioBus* destinationBus, size_t fra mesToProcess);
51 void reset(); 51 void reset();
52 52
53 size_t impulseResponseLength() const { return m_impulseResponseLength; } 53 size_t impulseResponseLength() const { return m_impulseResponseLength; }
54 size_t latencyFrames() const; 54 size_t latencyFrames() const;
55 55
56 private: 56 private:
57 void initialize(AudioBus* impulseResponseBuffer, size_t renderSliceSize, siz e_t maxFFTSize, size_t numberOfChannels, bool useBackgroundThreads); 57 void initialize(AudioBus* impulseResponseBuffer, size_t renderSliceSize, siz e_t maxFFTSize, size_t numberOfChannels, bool useBackgroundThreads);
58 58
59 size_t m_impulseResponseLength; 59 size_t m_impulseResponseLength;
60 60
61 Vector<OwnPtr<ReverbConvolver>> m_convolvers; 61 Vector<OwnPtr<ReverbConvolver>> m_convolvers;
62 62
63 // For "True" stereo processing 63 // For "True" stereo processing
64 RefPtr<AudioBus> m_tempBuffer; 64 RefPtr<AudioBus> m_tempBuffer;
65 }; 65 };
66 66
67 } // namespace blink 67 } // namespace blink
68 68
69 #endif // Reverb_h 69 #endif // Reverb_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698