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

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

Issue 2582443004: ScriptProcessor buffer size should be consistent with callback size (Closed)
Patch Set: Make callbackBufferSize pure virtual Created 3 years, 12 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
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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 // node has gone away? 0 is a valid time. 134 // node has gone away? 0 is a valid time.
135 return m_destinationNode 135 return m_destinationNode
136 ? m_destinationNode->audioDestinationHandler().currentTime() 136 ? m_destinationNode->audioDestinationHandler().currentTime()
137 : 0; 137 : 0;
138 } 138 }
139 139
140 float sampleRate() const { 140 float sampleRate() const {
141 return m_destinationNode ? m_destinationNode->handler().sampleRate() : 0; 141 return m_destinationNode ? m_destinationNode->handler().sampleRate() : 0;
142 } 142 }
143 143
144 size_t callbackBufferSize() const {
145 return m_destinationNode ? m_destinationNode->handler().callbackBufferSize()
146 : 0;
147 }
148
144 String state() const; 149 String state() const;
145 AudioContextState contextState() const { return m_contextState; } 150 AudioContextState contextState() const { return m_contextState; }
146 void throwExceptionForClosedState(ExceptionState&); 151 void throwExceptionForClosedState(ExceptionState&);
147 152
148 AudioBuffer* createBuffer(unsigned numberOfChannels, 153 AudioBuffer* createBuffer(unsigned numberOfChannels,
149 size_t numberOfFrames, 154 size_t numberOfFrames,
150 float sampleRate, 155 float sampleRate,
151 ExceptionState&); 156 ExceptionState&);
152 157
153 // Asynchronous audio file data decoding. 158 // Asynchronous audio file data decoding.
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 // It is somewhat arbitrary and could be increased if necessary. 456 // It is somewhat arbitrary and could be increased if necessary.
452 enum { MaxNumberOfChannels = 32 }; 457 enum { MaxNumberOfChannels = 32 };
453 458
454 Optional<AutoplayStatus> m_autoplayStatus; 459 Optional<AutoplayStatus> m_autoplayStatus;
455 AudioIOPosition m_outputPosition; 460 AudioIOPosition m_outputPosition;
456 }; 461 };
457 462
458 } // namespace blink 463 } // namespace blink
459 464
460 #endif // BaseAudioContext_h 465 #endif // BaseAudioContext_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698