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

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

Issue 2582443004: ScriptProcessor buffer size should be consistent with callback size (Closed)
Patch Set: Created 4 years 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) 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 // AudioHandler 43 // AudioHandler
44 void dispose() override; 44 void dispose() override;
45 void initialize() override; 45 void initialize() override;
46 void uninitialize() override; 46 void uninitialize() override;
47 void setChannelCount(unsigned long, ExceptionState&) override; 47 void setChannelCount(unsigned long, ExceptionState&) override;
48 48
49 // AudioDestinationHandler 49 // AudioDestinationHandler
50 void startRendering() override; 50 void startRendering() override;
51 void stopRendering() override; 51 void stopRendering() override;
52 unsigned long maxChannelCount() const override; 52 unsigned long maxChannelCount() const override;
53 size_t callbackBufferSize() const override;
53 54
54 private: 55 private:
55 explicit DefaultAudioDestinationHandler(AudioNode&); 56 explicit DefaultAudioDestinationHandler(AudioNode&);
56 void createDestination(); 57 void createDestination();
57 58
58 std::unique_ptr<AudioDestination> m_destination; 59 std::unique_ptr<AudioDestination> m_destination;
59 String m_inputDeviceId; 60 String m_inputDeviceId;
60 unsigned m_numberOfInputChannels; 61 unsigned m_numberOfInputChannels;
61 }; 62 };
62 63
63 class DefaultAudioDestinationNode final : public AudioDestinationNode { 64 class DefaultAudioDestinationNode final : public AudioDestinationNode {
64 public: 65 public:
65 static DefaultAudioDestinationNode* create(BaseAudioContext*); 66 static DefaultAudioDestinationNode* create(BaseAudioContext*);
66 67
68 size_t callbackBufferSize() const { return handler().callbackBufferSize(); };
69
67 private: 70 private:
68 explicit DefaultAudioDestinationNode(BaseAudioContext&); 71 explicit DefaultAudioDestinationNode(BaseAudioContext&);
69 }; 72 };
70 73
71 } // namespace blink 74 } // namespace blink
72 75
73 #endif // DefaultAudioDestinationNode_h 76 #endif // DefaultAudioDestinationNode_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698