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

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/OfflineAudioDestinationNode.h

Issue 2478283003: Use kRenderQuantumFrames in more places (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/webaudio/OfflineAudioDestinationNode.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 * 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 54
55 OfflineAudioContext* context() const final; 55 OfflineAudioContext* context() const final;
56 56
57 // AudioDestinationHandler 57 // AudioDestinationHandler
58 void startRendering() override; 58 void startRendering() override;
59 void stopRendering() override; 59 void stopRendering() override;
60 unsigned long maxChannelCount() const override; 60 unsigned long maxChannelCount() const override;
61 61
62 float sampleRate() const override { return m_renderTarget->sampleRate(); } 62 float sampleRate() const override { return m_renderTarget->sampleRate(); }
63 63
64 size_t renderQuantumFrames() const { return renderQuantumSize; } 64 size_t renderQuantumFrames() const {
65 return AudioUtilities::kRenderQuantumFrames;
66 }
65 67
66 WebThread* offlineRenderThread(); 68 WebThread* offlineRenderThread();
67 69
68 private: 70 private:
69 OfflineAudioDestinationHandler(AudioNode&, AudioBuffer* renderTarget); 71 OfflineAudioDestinationHandler(AudioNode&, AudioBuffer* renderTarget);
70 72
71 static const size_t renderQuantumSize;
72
73 // Set up the rendering and start. After setting the context up, it will 73 // Set up the rendering and start. After setting the context up, it will
74 // eventually call |doOfflineRendering|. 74 // eventually call |doOfflineRendering|.
75 void startOfflineRendering(); 75 void startOfflineRendering();
76 76
77 // Suspend the rendering loop and notify the main thread to resolve the 77 // Suspend the rendering loop and notify the main thread to resolve the
78 // associated promise. 78 // associated promise.
79 void suspendOfflineRendering(); 79 void suspendOfflineRendering();
80 80
81 // Start the rendering loop. 81 // Start the rendering loop.
82 void doOfflineRendering(); 82 void doOfflineRendering();
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 static OfflineAudioDestinationNode* create(BaseAudioContext*, 125 static OfflineAudioDestinationNode* create(BaseAudioContext*,
126 AudioBuffer* renderTarget); 126 AudioBuffer* renderTarget);
127 127
128 private: 128 private:
129 OfflineAudioDestinationNode(BaseAudioContext&, AudioBuffer* renderTarget); 129 OfflineAudioDestinationNode(BaseAudioContext&, AudioBuffer* renderTarget);
130 }; 130 };
131 131
132 } // namespace blink 132 } // namespace blink
133 133
134 #endif // OfflineAudioDestinationNode_h 134 #endif // OfflineAudioDestinationNode_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/webaudio/OfflineAudioDestinationNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698