| OLD | NEW |
| 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 Loading... |
| 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 // Returns the rendering callback buffer size. |
| 54 size_t callbackBufferSize() const override; |
| 53 | 55 |
| 54 private: | 56 private: |
| 55 explicit DefaultAudioDestinationHandler(AudioNode&); | 57 explicit DefaultAudioDestinationHandler(AudioNode&); |
| 56 void createDestination(); | 58 void createDestination(); |
| 57 | 59 |
| 58 std::unique_ptr<AudioDestination> m_destination; | 60 std::unique_ptr<AudioDestination> m_destination; |
| 59 String m_inputDeviceId; | 61 String m_inputDeviceId; |
| 60 unsigned m_numberOfInputChannels; | 62 unsigned m_numberOfInputChannels; |
| 61 }; | 63 }; |
| 62 | 64 |
| 63 class DefaultAudioDestinationNode final : public AudioDestinationNode { | 65 class DefaultAudioDestinationNode final : public AudioDestinationNode { |
| 64 public: | 66 public: |
| 65 static DefaultAudioDestinationNode* create(BaseAudioContext*); | 67 static DefaultAudioDestinationNode* create(BaseAudioContext*); |
| 66 | 68 |
| 69 size_t callbackBufferSize() const { return handler().callbackBufferSize(); }; |
| 70 |
| 67 private: | 71 private: |
| 68 explicit DefaultAudioDestinationNode(BaseAudioContext&); | 72 explicit DefaultAudioDestinationNode(BaseAudioContext&); |
| 69 }; | 73 }; |
| 70 | 74 |
| 71 } // namespace blink | 75 } // namespace blink |
| 72 | 76 |
| 73 #endif // DefaultAudioDestinationNode_h | 77 #endif // DefaultAudioDestinationNode_h |
| OLD | NEW |