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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 m_destination->stop(); | 71 m_destination->stop(); |
72 m_numberOfInputChannels = 0; | 72 m_numberOfInputChannels = 0; |
73 | 73 |
74 AudioHandler::uninitialize(); | 74 AudioHandler::uninitialize(); |
75 } | 75 } |
76 | 76 |
77 void DefaultAudioDestinationHandler::createDestination() { | 77 void DefaultAudioDestinationHandler::createDestination() { |
78 float hardwareSampleRate = AudioDestination::hardwareSampleRate(); | 78 float hardwareSampleRate = AudioDestination::hardwareSampleRate(); |
79 VLOG(1) << ">>>> hardwareSampleRate = " << hardwareSampleRate; | 79 VLOG(1) << ">>>> hardwareSampleRate = " << hardwareSampleRate; |
80 | 80 |
81 m_destination = AudioDestination::create( | 81 m_destination = |
82 *this, m_inputDeviceId, m_numberOfInputChannels, channelCount(), | 82 AudioDestination::create(*this, channelCount(), hardwareSampleRate, |
83 hardwareSampleRate, context()->getSecurityOrigin()); | 83 context()->getSecurityOrigin()); |
84 } | 84 } |
85 | 85 |
86 void DefaultAudioDestinationHandler::startRendering() { | 86 void DefaultAudioDestinationHandler::startRendering() { |
87 DCHECK(isInitialized()); | 87 DCHECK(isInitialized()); |
88 if (isInitialized()) { | 88 if (isInitialized()) { |
89 DCHECK(!m_destination->isPlaying()); | 89 DCHECK(!m_destination->isPlaying()); |
90 m_destination->start(); | 90 m_destination->start(); |
91 } | 91 } |
92 } | 92 } |
93 | 93 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 : AudioDestinationNode(context) { | 144 : AudioDestinationNode(context) { |
145 setHandler(DefaultAudioDestinationHandler::create(*this)); | 145 setHandler(DefaultAudioDestinationHandler::create(*this)); |
146 } | 146 } |
147 | 147 |
148 DefaultAudioDestinationNode* DefaultAudioDestinationNode::create( | 148 DefaultAudioDestinationNode* DefaultAudioDestinationNode::create( |
149 BaseAudioContext* context) { | 149 BaseAudioContext* context) { |
150 return new DefaultAudioDestinationNode(*context); | 150 return new DefaultAudioDestinationNode(*context); |
151 } | 151 } |
152 | 152 |
153 } // namespace blink | 153 } // namespace blink |
OLD | NEW |