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

Side by Side Diff: media/audio/linux/pulse_output.cc

Issue 7473021: PulseAudio Sound Playback on Linux (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 5 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
(Empty)
1 #include "media/audio/linux/pulse_output.h"
sjl 2011/07/21 04:58:32 Copyright header needed.
slock 2011/07/21 17:10:57 I was going to copy-paste that in right before upl
2
3 #include "media/audio/linux/audio_manager_linux.h"
4 #include "media/base/seekable_buffer.h"
5
6 PulseAudioOutputStream::PulseAudioOutputStream(const AudioParameters& params,
7 AudioManagerLinux* manager)
8 : channel_layout_(params.channel_layout),
9 sample_rate_(params.sample_rate),
10 bytes_per_sample_(params.bits_per_sample / 8),
11 bytes_per_frame_(params.channels * params.bits_per_sample / 8),
12 should_downmix_(false),
13 should_swizzle_(false),
14 packet_size_(params.GetPacketSize()),
15 stop_stream_(false),
16 manager_(manager),
17 mainloop_(NULL),
18 mainloop_api_(NULL),
19 context_(NULL),
20 playback_handle_(NULL),
21 frames_per_packet_(packet_size_ / bytes_per_frame_),
22 state_(kCreated),
23 volume_(1.0f),
24 source_callback_(NULL) {
25 // TODO: Sanity check input values.
sjl 2011/07/21 04:58:32 "TODO(slock): comment", here and elsewhere.
slock 2011/07/21 17:10:57 Done.
26 }
27
28 PulseAudioOutputStream::~PulseAudioOutputStream() {
29 // TODO
scherkus (not reviewing) 2011/07/21 21:36:32 you know what's even better than TODO... NOTIMPLEM
30 }
31
32 bool PulseAudioOutputStream::Open() {
33 // TODO, method skeleton.
34 return false;
35 }
36
37 void PulseAudioOutputStream::Close() {
38 // TODO
39 }
40
41 void PulseAudioOutputStream::Start(AudioSourceCallback* callback) {
42 // TODO
43 }
44
45 void PulseAudioOutputStream::Stop() {
46 // TODO
47 }
48
49 void PulseAudioOutputStream::SetVolume(double volume) {
50 // TODO
51 }
52
53 void PulseAudioOutputStream::GetVolume(double* volume) {
54 // TODO
55 }
56
57 bool PulseAudioOutputStream::CanTransitionTo(InternalState to) {
58 // TODO, method skeleton.
59 return false;
60 }
61
62 PulseAudioOutputStream::InternalState
63 PulseAudioOutputStream::TransitionTo(InternalState to) {
64 // TODO, method skeleton.
65 return state_;
66 }
67
68 PulseAudioOutputStream::InternalState PulseAudioOutputStream::state() {
69 return state_;
70 }
71
72 uint32 PulseAudioOutputStream::RunDataCallback(uint8* dest,
73 uint32 max_size,
sjl 2011/07/21 04:58:32 Indentation is off. As the last arg won't fit, bri
slock 2011/07/21 17:10:57 Done.
74 AudioBuffersState buffers_state) {
75 // TODO, method skeleton.
76 return 0;
77 }
78
79 void PulseAudioOutputStream::RunErrorCallback(int code) {
80 // TODO
81 }
82
83 void PulseAudioOutputStream::set_source_callback(
84 AudioSourceCallback* callback) {
sjl 2011/07/21 04:58:32 Indent this 4 spaces from the begininning of the l
slock 2011/07/21 17:10:57 Done.
85 // TODO
86 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698