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

Side by Side Diff: media/audio/linux/alsa_output.h

Issue 1618006: Assume pending buffered bytes is zero when ALSA has underrun. (Closed)
Patch Set: Tiny fix Created 10 years, 8 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 | « no previous file | media/audio/linux/alsa_output.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 // Creates an output stream based on the ALSA PCM interface. 5 // Creates an output stream based on the ALSA PCM interface.
6 // 6 //
7 // On device write failure, the stream will move itself to an invalid state. 7 // On device write failure, the stream will move itself to an invalid state.
8 // No more data will be pulled from the data source, or written to the device. 8 // No more data will be pulled from the data source, or written to the device.
9 // All calls to public API functions will either no-op themselves, or return an 9 // All calls to public API functions will either no-op themselves, or return an
10 // error if possible. Specifically, If the stream is in an error state, Open() 10 // error if possible. Specifically, If the stream is in an error state, Open()
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 virtual void SetVolume(double volume); 84 virtual void SetVolume(double volume);
85 virtual void GetVolume(double* volume); 85 virtual void GetVolume(double* volume);
86 86
87 private: 87 private:
88 friend class base::RefCountedThreadSafe<AlsaPcmOutputStream>; 88 friend class base::RefCountedThreadSafe<AlsaPcmOutputStream>;
89 friend class AlsaPcmOutputStreamTest; 89 friend class AlsaPcmOutputStreamTest;
90 FRIEND_TEST(AlsaPcmOutputStreamTest, AutoSelectDevice_DeviceSelect); 90 FRIEND_TEST(AlsaPcmOutputStreamTest, AutoSelectDevice_DeviceSelect);
91 FRIEND_TEST(AlsaPcmOutputStreamTest, AutoSelectDevice_FallbackDevices); 91 FRIEND_TEST(AlsaPcmOutputStreamTest, AutoSelectDevice_FallbackDevices);
92 FRIEND_TEST(AlsaPcmOutputStreamTest, AutoSelectDevice_HintFail); 92 FRIEND_TEST(AlsaPcmOutputStreamTest, AutoSelectDevice_HintFail);
93 FRIEND_TEST(AlsaPcmOutputStreamTest, BufferPacket); 93 FRIEND_TEST(AlsaPcmOutputStreamTest, BufferPacket);
94 FRIEND_TEST(AlsaPcmOutputStreamTest, BufferPacket_Negative);
94 FRIEND_TEST(AlsaPcmOutputStreamTest, BufferPacket_StopStream); 95 FRIEND_TEST(AlsaPcmOutputStreamTest, BufferPacket_StopStream);
96 FRIEND_TEST(AlsaPcmOutputStreamTest, BufferPacket_Underrun);
95 FRIEND_TEST(AlsaPcmOutputStreamTest, BufferPacket_UnfinishedPacket); 97 FRIEND_TEST(AlsaPcmOutputStreamTest, BufferPacket_UnfinishedPacket);
96 FRIEND_TEST(AlsaPcmOutputStreamTest, ConstructedState); 98 FRIEND_TEST(AlsaPcmOutputStreamTest, ConstructedState);
97 FRIEND_TEST(AlsaPcmOutputStreamTest, LatencyFloor); 99 FRIEND_TEST(AlsaPcmOutputStreamTest, LatencyFloor);
98 FRIEND_TEST(AlsaPcmOutputStreamTest, OpenClose); 100 FRIEND_TEST(AlsaPcmOutputStreamTest, OpenClose);
99 FRIEND_TEST(AlsaPcmOutputStreamTest, PcmOpenFailed); 101 FRIEND_TEST(AlsaPcmOutputStreamTest, PcmOpenFailed);
100 FRIEND_TEST(AlsaPcmOutputStreamTest, PcmSetParamsFailed); 102 FRIEND_TEST(AlsaPcmOutputStreamTest, PcmSetParamsFailed);
101 FRIEND_TEST(AlsaPcmOutputStreamTest, ScheduleNextWrite); 103 FRIEND_TEST(AlsaPcmOutputStreamTest, ScheduleNextWrite);
102 FRIEND_TEST(AlsaPcmOutputStreamTest, ScheduleNextWrite_StopStream); 104 FRIEND_TEST(AlsaPcmOutputStreamTest, ScheduleNextWrite_StopStream);
103 FRIEND_TEST(AlsaPcmOutputStreamTest, StartStop); 105 FRIEND_TEST(AlsaPcmOutputStreamTest, StartStop);
104 FRIEND_TEST(AlsaPcmOutputStreamTest, WritePacket_FinishedPacket); 106 FRIEND_TEST(AlsaPcmOutputStreamTest, WritePacket_FinishedPacket);
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 MessageLoop* client_thread_loop_; 253 MessageLoop* client_thread_loop_;
252 254
253 // The message loop responsible for querying the data source, and writing to 255 // The message loop responsible for querying the data source, and writing to
254 // the output device. 256 // the output device.
255 MessageLoop* message_loop_; 257 MessageLoop* message_loop_;
256 258
257 DISALLOW_COPY_AND_ASSIGN(AlsaPcmOutputStream); 259 DISALLOW_COPY_AND_ASSIGN(AlsaPcmOutputStream);
258 }; 260 };
259 261
260 #endif // MEDIA_AUDIO_LINUX_ALSA_OUTPUT_H_ 262 #endif // MEDIA_AUDIO_LINUX_ALSA_OUTPUT_H_
OLDNEW
« no previous file with comments | « no previous file | media/audio/linux/alsa_output.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698