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

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

Issue 357004: SetVolume and GetVolume take one volume instead of separate left and right vo... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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
« no previous file with comments | « media/audio/fake_audio_output_stream.cc ('k') | 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 AlsaWrapper* wrapper, 75 AlsaWrapper* wrapper,
76 AudioManagerLinux* manager, 76 AudioManagerLinux* manager,
77 MessageLoop* message_loop); 77 MessageLoop* message_loop);
78 virtual ~AlsaPcmOutputStream(); 78 virtual ~AlsaPcmOutputStream();
79 79
80 // Implementation of AudioOutputStream. 80 // Implementation of AudioOutputStream.
81 virtual bool Open(size_t packet_size); 81 virtual bool Open(size_t packet_size);
82 virtual void Close(); 82 virtual void Close();
83 virtual void Start(AudioSourceCallback* callback); 83 virtual void Start(AudioSourceCallback* callback);
84 virtual void Stop(); 84 virtual void Stop();
85 virtual void SetVolume(double left_level, double right_level); 85 virtual void SetVolume(double volume);
86 virtual void GetVolume(double* left_level, double* right_level); 86 virtual void GetVolume(double* volume);
87 87
88 private: 88 private:
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_StopStream); 94 FRIEND_TEST(AlsaPcmOutputStreamTest, BufferPacket_StopStream);
95 FRIEND_TEST(AlsaPcmOutputStreamTest, BufferPacket_UnfinishedPacket); 95 FRIEND_TEST(AlsaPcmOutputStreamTest, BufferPacket_UnfinishedPacket);
96 FRIEND_TEST(AlsaPcmOutputStreamTest, ConstructedState); 96 FRIEND_TEST(AlsaPcmOutputStreamTest, ConstructedState);
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 MessageLoop* client_thread_loop_; 250 MessageLoop* client_thread_loop_;
251 251
252 // The message loop responsible for querying the data source, and writing to 252 // The message loop responsible for querying the data source, and writing to
253 // the output device. 253 // the output device.
254 MessageLoop* message_loop_; 254 MessageLoop* message_loop_;
255 255
256 DISALLOW_COPY_AND_ASSIGN(AlsaPcmOutputStream); 256 DISALLOW_COPY_AND_ASSIGN(AlsaPcmOutputStream);
257 }; 257 };
258 258
259 #endif // MEDIA_AUDIO_LINUX_ALSA_OUTPUT_H_ 259 #endif // MEDIA_AUDIO_LINUX_ALSA_OUTPUT_H_
OLDNEW
« no previous file with comments | « media/audio/fake_audio_output_stream.cc ('k') | media/audio/linux/alsa_output.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698