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

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

Issue 1915793002: Remove a |readonly| member of MediaStreamTrack (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove a |readonly| argument in unittest files Created 4 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
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 25 matching lines...) Expand all
36 namespace blink { 36 namespace blink {
37 37
38 // WebAudioCapturerSource ignores the channel count beyond 8, so we set the 38 // WebAudioCapturerSource ignores the channel count beyond 8, so we set the
39 // block here to avoid anything can cause the crash. 39 // block here to avoid anything can cause the crash.
40 static const unsigned long kMaxChannelCount = 8; 40 static const unsigned long kMaxChannelCount = 8;
41 41
42 MediaStreamAudioDestinationHandler::MediaStreamAudioDestinationHandler(AudioNode & node, size_t numberOfChannels) 42 MediaStreamAudioDestinationHandler::MediaStreamAudioDestinationHandler(AudioNode & node, size_t numberOfChannels)
43 : AudioBasicInspectorHandler(NodeTypeMediaStreamAudioDestination, node, node .context()->sampleRate(), numberOfChannels) 43 : AudioBasicInspectorHandler(NodeTypeMediaStreamAudioDestination, node, node .context()->sampleRate(), numberOfChannels)
44 , m_mixBus(AudioBus::create(numberOfChannels, ProcessingSizeInFrames)) 44 , m_mixBus(AudioBus::create(numberOfChannels, ProcessingSizeInFrames))
45 { 45 {
46 m_source = MediaStreamSource::create("WebAudio-" + createCanonicalUUIDString (), MediaStreamSource::TypeAudio, "MediaStreamAudioDestinationNode", false, true , MediaStreamSource::ReadyStateLive, true); 46 m_source = MediaStreamSource::create("WebAudio-" + createCanonicalUUIDString (), MediaStreamSource::TypeAudio, "MediaStreamAudioDestinationNode", false, Medi aStreamSource::ReadyStateLive, true);
47 MediaStreamSourceVector audioSources; 47 MediaStreamSourceVector audioSources;
48 audioSources.append(m_source.get()); 48 audioSources.append(m_source.get());
49 MediaStreamSourceVector videoSources; 49 MediaStreamSourceVector videoSources;
50 m_stream = MediaStream::create(node.context()->getExecutionContext(), MediaS treamDescriptor::create(audioSources, videoSources)); 50 m_stream = MediaStream::create(node.context()->getExecutionContext(), MediaS treamDescriptor::create(audioSources, videoSources));
51 MediaStreamCenter::instance().didCreateMediaStreamAndTracks(m_stream->descri ptor()); 51 MediaStreamCenter::instance().didCreateMediaStreamAndTracks(m_stream->descri ptor());
52 52
53 m_source->setAudioFormat(numberOfChannels, node.context()->sampleRate()); 53 m_source->setAudioFormat(numberOfChannels, node.context()->sampleRate());
54 54
55 initialize(); 55 initialize();
56 } 56 }
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 return new MediaStreamAudioDestinationNode(context, numberOfChannels); 127 return new MediaStreamAudioDestinationNode(context, numberOfChannels);
128 } 128 }
129 129
130 MediaStream* MediaStreamAudioDestinationNode::stream() const 130 MediaStream* MediaStreamAudioDestinationNode::stream() const
131 { 131 {
132 return static_cast<MediaStreamAudioDestinationHandler&>(handler()).stream(); 132 return static_cast<MediaStreamAudioDestinationHandler&>(handler()).stream();
133 } 133 }
134 134
135 } // namespace blink 135 } // namespace blink
136 136
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698