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

Side by Side Diff: Source/modules/webaudio/AudioContext.h

Issue 565643003: Move utility functions for sample rate to AudioUtilities. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add modification in MediaElementSourceNode. Created 6 years, 3 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
« no previous file with comments | « Source/modules/webaudio/AudioBuffer.cpp ('k') | Source/modules/webaudio/AudioContext.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) 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 * 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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 232
233 void startRendering(); 233 void startRendering();
234 void fireCompletionEvent(); 234 void fireCompletionEvent();
235 235
236 static unsigned s_hardwareContextCount; 236 static unsigned s_hardwareContextCount;
237 237
238 protected: 238 protected:
239 explicit AudioContext(Document*); 239 explicit AudioContext(Document*);
240 AudioContext(Document*, unsigned numberOfChannels, size_t numberOfFrames, fl oat sampleRate); 240 AudioContext(Document*, unsigned numberOfChannels, size_t numberOfFrames, fl oat sampleRate);
241 241
242 static bool isSampleRateRangeGood(float sampleRate);
243
244 private: 242 private:
245 void initialize(); 243 void initialize();
246 void uninitialize(); 244 void uninitialize();
247 245
248 // ExecutionContext calls stop twice. 246 // ExecutionContext calls stop twice.
249 // We'd like to schedule only one stop action for them. 247 // We'd like to schedule only one stop action for them.
250 bool m_isStopScheduled; 248 bool m_isStopScheduled;
251 bool m_isCleared; 249 bool m_isCleared;
252 void clear(); 250 void clear();
253 251
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 HashSet<AudioNode*> m_deferredCountModeChange; 352 HashSet<AudioNode*> m_deferredCountModeChange;
355 353
356 // This is considering 32 is large enough for multiple channels audio. 354 // This is considering 32 is large enough for multiple channels audio.
357 // It is somewhat arbitrary and could be increased if necessary. 355 // It is somewhat arbitrary and could be increased if necessary.
358 enum { MaxNumberOfChannels = 32 }; 356 enum { MaxNumberOfChannels = 32 };
359 }; 357 };
360 358
361 } // namespace blink 359 } // namespace blink
362 360
363 #endif // AudioContext_h 361 #endif // AudioContext_h
OLDNEW
« no previous file with comments | « Source/modules/webaudio/AudioBuffer.cpp ('k') | Source/modules/webaudio/AudioContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698