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

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/MediaStreamAudioDestinationNode.cpp

Issue 2842213002: MediaStreamAudioDestination channelCountMode is "explicit" (Closed)
Patch Set: Update test Created 3 years, 7 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 | « third_party/WebKit/LayoutTests/webaudio/constructor/mediastreamaudiodestination.html ('k') | no next file » | 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) 2012, Google Inc. All rights reserved. 2 * Copyright (C) 2012, 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 audio_sources.push_back(source_.Get()); 58 audio_sources.push_back(source_.Get());
59 MediaStreamSourceVector video_sources; 59 MediaStreamSourceVector video_sources;
60 stream_ = MediaStream::Create( 60 stream_ = MediaStream::Create(
61 node.context()->GetExecutionContext(), 61 node.context()->GetExecutionContext(),
62 MediaStreamDescriptor::Create(audio_sources, video_sources)); 62 MediaStreamDescriptor::Create(audio_sources, video_sources));
63 MediaStreamCenter::Instance().DidCreateMediaStreamAndTracks( 63 MediaStreamCenter::Instance().DidCreateMediaStreamAndTracks(
64 stream_->Descriptor()); 64 stream_->Descriptor());
65 65
66 source_->SetAudioFormat(number_of_channels, node.context()->sampleRate()); 66 source_->SetAudioFormat(number_of_channels, node.context()->sampleRate());
67 67
68 SetInternalChannelCountMode(kExplicit);
68 Initialize(); 69 Initialize();
69 } 70 }
70 71
71 PassRefPtr<MediaStreamAudioDestinationHandler> 72 PassRefPtr<MediaStreamAudioDestinationHandler>
72 MediaStreamAudioDestinationHandler::Create(AudioNode& node, 73 MediaStreamAudioDestinationHandler::Create(AudioNode& node,
73 size_t number_of_channels) { 74 size_t number_of_channels) {
74 return AdoptRef( 75 return AdoptRef(
75 new MediaStreamAudioDestinationHandler(node, number_of_channels)); 76 new MediaStreamAudioDestinationHandler(node, number_of_channels));
76 } 77 }
77 78
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 node->HandleChannelOptions(options, exception_state); 182 node->HandleChannelOptions(options, exception_state);
182 183
183 return node; 184 return node;
184 } 185 }
185 186
186 MediaStream* MediaStreamAudioDestinationNode::stream() const { 187 MediaStream* MediaStreamAudioDestinationNode::stream() const {
187 return static_cast<MediaStreamAudioDestinationHandler&>(Handler()).Stream(); 188 return static_cast<MediaStreamAudioDestinationHandler&>(Handler()).Stream();
188 } 189 }
189 190
190 } // namespace blink 191 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/webaudio/constructor/mediastreamaudiodestination.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698