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

Side by Side Diff: trunk/src/media/audio/audio_output_dispatcher_impl.h

Issue 101473002: Revert 238325 "Attempt to fix audio wedges by restarting all str..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years 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 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // AudioOutputDispatcherImpl is an implementation of AudioOutputDispatcher. 5 // AudioOutputDispatcherImpl is an implementation of AudioOutputDispatcher.
6 // 6 //
7 // To avoid opening and closing audio devices more frequently than necessary, 7 // To avoid opening and closing audio devices more frequently than necessary,
8 // each dispatcher has a pool of inactive physical streams. A stream is closed 8 // each dispatcher has a pool of inactive physical streams. A stream is closed
9 // only if it hasn't been used for a certain period of time (specified via the 9 // only if it hasn't been used for a certain period of time (specified via the
10 // constructor). 10 // constructor).
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 // |stream| is added to the pool of pending streams (i.e. |idle_streams_|). 52 // |stream| is added to the pool of pending streams (i.e. |idle_streams_|).
53 virtual void StopStream(AudioOutputProxy* stream_proxy) OVERRIDE; 53 virtual void StopStream(AudioOutputProxy* stream_proxy) OVERRIDE;
54 54
55 virtual void StreamVolumeSet(AudioOutputProxy* stream_proxy, 55 virtual void StreamVolumeSet(AudioOutputProxy* stream_proxy,
56 double volume) OVERRIDE; 56 double volume) OVERRIDE;
57 57
58 virtual void CloseStream(AudioOutputProxy* stream_proxy) OVERRIDE; 58 virtual void CloseStream(AudioOutputProxy* stream_proxy) OVERRIDE;
59 59
60 virtual void Shutdown() OVERRIDE; 60 virtual void Shutdown() OVERRIDE;
61 61
62 virtual void CloseStreamsForWedgeFix() OVERRIDE;
63 virtual void RestartStreamsForWedgeFix() OVERRIDE;
64
65 private: 62 private:
66 typedef std::map<AudioOutputProxy*, AudioOutputStream*> AudioStreamMap; 63 typedef std::map<AudioOutputProxy*, AudioOutputStream*> AudioStreamMap;
67 friend class base::RefCountedThreadSafe<AudioOutputDispatcherImpl>; 64 friend class base::RefCountedThreadSafe<AudioOutputDispatcherImpl>;
68 virtual ~AudioOutputDispatcherImpl(); 65 virtual ~AudioOutputDispatcherImpl();
69 66
70 friend class AudioOutputProxyTest; 67 friend class AudioOutputProxyTest;
71 68
72 // Creates a new physical output stream, opens it and pushes to 69 // Creates a new physical output stream, opens it and pushes to
73 // |idle_streams_|. Returns false if the stream couldn't be created or 70 // |idle_streams_|. Returns false if the stream couldn't be created or
74 // opened. 71 // opened.
(...skipping 17 matching lines...) Expand all
92 base::DelayTimer<AudioOutputDispatcherImpl> close_timer_; 89 base::DelayTimer<AudioOutputDispatcherImpl> close_timer_;
93 90
94 AudioStreamMap proxy_to_physical_map_; 91 AudioStreamMap proxy_to_physical_map_;
95 92
96 DISALLOW_COPY_AND_ASSIGN(AudioOutputDispatcherImpl); 93 DISALLOW_COPY_AND_ASSIGN(AudioOutputDispatcherImpl);
97 }; 94 };
98 95
99 } // namespace media 96 } // namespace media
100 97
101 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_DISPATCHER_IMPL_H_ 98 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_DISPATCHER_IMPL_H_
OLDNEW
« no previous file with comments | « trunk/src/media/audio/audio_output_dispatcher.h ('k') | trunk/src/media/audio/audio_output_dispatcher_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698