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

Unified Diff: media/audio/pulse/pulse_output.h

Issue 8499029: make pulseaudio available for all posix platforms because it's not linux only (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: don't include pulse on windows Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/audio/openbsd/audio_manager_openbsd.cc ('k') | media/audio/pulse/pulse_output.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/pulse/pulse_output.h
diff --git a/media/audio/linux/pulse_output.h b/media/audio/pulse/pulse_output.h
similarity index 91%
rename from media/audio/linux/pulse_output.h
rename to media/audio/pulse/pulse_output.h
index 46aab578ff15b799cbfa67d685785befa51fa97c..d795caf332715313ae5873ee8183008b3e2bd797 100644
--- a/media/audio/linux/pulse_output.h
+++ b/media/audio/pulse/pulse_output.h
@@ -16,8 +16,8 @@
// inside PulseAudio in Start() and repeated during playback, waiting for
// PulseAudio write callbacks to occur.
-#ifndef MEDIA_AUDIO_LINUX_PULSE_OUTPUT_H_
-#define MEDIA_AUDIO_LINUX_PULSE_OUTPUT_H_
+#ifndef MEDIA_AUDIO_PULSE_PULSE_OUTPUT_H_
+#define MEDIA_AUDIO_PULSE_PULSE_OUTPUT_H_
#include <pulse/pulseaudio.h>
@@ -31,14 +31,23 @@ namespace media {
class SeekableBuffer;
}
+#if defined(OS_LINUX)
class AudioManagerLinux;
+typedef AudioManagerLinux AudioManagerPulse;
+#elif defined(OS_OPENBSD)
+class AudioManagerOpenBSD;
+typedef AudioManagerOpenBSD AudioManagerPulse;
+#else
+#error Unsupported platform
+#endif
+
struct AudioParameters;
class MessageLoop;
class PulseAudioOutputStream : public AudioOutputStream {
public:
PulseAudioOutputStream(const AudioParameters& params,
- AudioManagerLinux* manager,
+ AudioManagerPulse* manager,
MessageLoop* message_loop);
virtual ~PulseAudioOutputStream();
@@ -86,7 +95,7 @@ class PulseAudioOutputStream : public AudioOutputStream {
const uint32 bytes_per_frame_;
// Audio manager that created us. Used to report that we've closed.
- AudioManagerLinux* manager_;
+ AudioManagerPulse* manager_;
// PulseAudio API structs.
pa_context* pa_context_;
@@ -128,4 +137,4 @@ class PulseAudioOutputStream : public AudioOutputStream {
DISALLOW_COPY_AND_ASSIGN(PulseAudioOutputStream);
};
-#endif // MEDIA_AUDIO_LINUX_PULSE_OUTPUT_H_
+#endif // MEDIA_AUDIO_PULSE_PULSE_OUTPUT_H_
« no previous file with comments | « media/audio/openbsd/audio_manager_openbsd.cc ('k') | media/audio/pulse/pulse_output.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698