Index: media/audio/linux/pulse_output.cc |
diff --git a/media/audio/linux/pulse_output.cc b/media/audio/linux/pulse_output.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..4a3ac8a032a06ad61f1f4ae956803671ec069193 |
--- /dev/null |
+++ b/media/audio/linux/pulse_output.cc |
@@ -0,0 +1,86 @@ |
+#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
|
+ |
+#include "media/audio/linux/audio_manager_linux.h" |
+#include "media/base/seekable_buffer.h" |
+ |
+PulseAudioOutputStream::PulseAudioOutputStream(const AudioParameters& params, |
+ AudioManagerLinux* manager) |
+ : channel_layout_(params.channel_layout), |
+ sample_rate_(params.sample_rate), |
+ bytes_per_sample_(params.bits_per_sample / 8), |
+ bytes_per_frame_(params.channels * params.bits_per_sample / 8), |
+ should_downmix_(false), |
+ should_swizzle_(false), |
+ packet_size_(params.GetPacketSize()), |
+ stop_stream_(false), |
+ manager_(manager), |
+ mainloop_(NULL), |
+ mainloop_api_(NULL), |
+ context_(NULL), |
+ playback_handle_(NULL), |
+ frames_per_packet_(packet_size_ / bytes_per_frame_), |
+ state_(kCreated), |
+ volume_(1.0f), |
+ source_callback_(NULL) { |
+ // 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.
|
+} |
+ |
+PulseAudioOutputStream::~PulseAudioOutputStream() { |
+ // TODO |
scherkus (not reviewing)
2011/07/21 21:36:32
you know what's even better than TODO... NOTIMPLEM
|
+} |
+ |
+bool PulseAudioOutputStream::Open() { |
+ // TODO, method skeleton. |
+ return false; |
+} |
+ |
+void PulseAudioOutputStream::Close() { |
+ // TODO |
+} |
+ |
+void PulseAudioOutputStream::Start(AudioSourceCallback* callback) { |
+ // TODO |
+} |
+ |
+void PulseAudioOutputStream::Stop() { |
+ // TODO |
+} |
+ |
+void PulseAudioOutputStream::SetVolume(double volume) { |
+ // TODO |
+} |
+ |
+void PulseAudioOutputStream::GetVolume(double* volume) { |
+ // TODO |
+} |
+ |
+bool PulseAudioOutputStream::CanTransitionTo(InternalState to) { |
+ // TODO, method skeleton. |
+ return false; |
+} |
+ |
+PulseAudioOutputStream::InternalState |
+PulseAudioOutputStream::TransitionTo(InternalState to) { |
+ // TODO, method skeleton. |
+ return state_; |
+} |
+ |
+PulseAudioOutputStream::InternalState PulseAudioOutputStream::state() { |
+ return state_; |
+} |
+ |
+uint32 PulseAudioOutputStream::RunDataCallback(uint8* dest, |
+ 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.
|
+ AudioBuffersState buffers_state) { |
+ // TODO, method skeleton. |
+ return 0; |
+} |
+ |
+void PulseAudioOutputStream::RunErrorCallback(int code) { |
+ // TODO |
+} |
+ |
+void PulseAudioOutputStream::set_source_callback( |
+ 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.
|
+ // TODO |
+} |