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

Side by Side Diff: Source/modules/webaudio/AudioContext.cpp

Issue 173363002: Move mediastream module to oilpan transition types (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 6 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010, Google Inc. All rights reserved. 2 * Copyright (C) 2010, 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 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 341
342 MediaStreamTrackVector audioTracks = mediaStream->getAudioTracks(); 342 MediaStreamTrackVector audioTracks = mediaStream->getAudioTracks();
343 if (audioTracks.isEmpty()) { 343 if (audioTracks.isEmpty()) {
344 exceptionState.throwDOMException( 344 exceptionState.throwDOMException(
345 InvalidStateError, 345 InvalidStateError,
346 "MediaStream has no audio track"); 346 "MediaStream has no audio track");
347 return nullptr; 347 return nullptr;
348 } 348 }
349 349
350 // Use the first audio track in the media stream. 350 // Use the first audio track in the media stream.
351 RefPtr<MediaStreamTrack> audioTrack = audioTracks[0]; 351 RefPtrWillBeRawPtr<MediaStreamTrack> audioTrack = audioTracks[0];
352 OwnPtr<AudioSourceProvider> provider = audioTrack->createWebAudioSource(); 352 OwnPtr<AudioSourceProvider> provider = audioTrack->createWebAudioSource();
353 RefPtrWillBeRawPtr<MediaStreamAudioSourceNode> node = MediaStreamAudioSource Node::create(this, mediaStream, audioTrack.get(), provider.release()); 353 RefPtrWillBeRawPtr<MediaStreamAudioSourceNode> node = MediaStreamAudioSource Node::create(this, mediaStream, audioTrack.get(), provider.release());
354 354
355 // FIXME: Only stereo streams are supported right now. We should be able to accept multi-channel streams. 355 // FIXME: Only stereo streams are supported right now. We should be able to accept multi-channel streams.
356 node->setFormat(2, sampleRate()); 356 node->setFormat(2, sampleRate());
357 357
358 refNode(node.get()); // context keeps reference until node is disconnected 358 refNode(node.get()); // context keeps reference until node is disconnected
359 return node; 359 return node;
360 } 360 }
361 361
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after
971 { 971 {
972 visitor->trace(m_renderTarget); 972 visitor->trace(m_renderTarget);
973 visitor->trace(m_destinationNode); 973 visitor->trace(m_destinationNode);
974 visitor->trace(m_listener); 974 visitor->trace(m_listener);
975 visitor->trace(m_dirtySummingJunctions); 975 visitor->trace(m_dirtySummingJunctions);
976 } 976 }
977 977
978 } // namespace WebCore 978 } // namespace WebCore
979 979
980 #endif // ENABLE(WEB_AUDIO) 980 #endif // ENABLE(WEB_AUDIO)
OLDNEW
« no previous file with comments | « Source/modules/mediastream/UserMediaRequest.cpp ('k') | Source/platform/exported/WebMediaStreamTrackSourcesRequest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698