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

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

Issue 10952024: Adding pulseaudio input support to chrome (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: switched to dynamic linking and addressed Andrew's comments. Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: media/audio/pulse/pulse_output.h
diff --git a/media/audio/pulse/pulse_output.h b/media/audio/pulse/pulse_output.h
index cdd7cfd0dc9ada362c9caf28a18b93c6fd89604e..142e8463422360e966f201a57c6eab9c3e23a679 100644
--- a/media/audio/pulse/pulse_output.h
+++ b/media/audio/pulse/pulse_output.h
@@ -31,10 +31,12 @@ struct pa_threaded_mainloop;
namespace media {
class AudioManagerBase;
+class PulseWrapper;
class PulseAudioOutputStream : public AudioOutputStream {
public:
- PulseAudioOutputStream(const AudioParameters& params,
+ PulseAudioOutputStream(PulseWrapper* wrapper,
+ const AudioParameters& params,
AudioManagerBase* manager);
virtual ~PulseAudioOutputStream();
@@ -55,7 +57,7 @@ class PulseAudioOutputStream : public AudioOutputStream {
static void StreamNotifyCallback(pa_stream* s, void* p_this);
// Triggers pa_threaded_mainloop_signal() to avoid deadlocks.
- static void StreamSuccessCallback(pa_stream* s, int success, void* p_this);
+ static void StreamSuccessCallback(pa_stream* s, int error, void* p_this);
// Called by PulseAudio when it needs more audio data.
static void StreamRequestCallback(pa_stream* s, size_t len, void* p_this);
@@ -67,11 +69,8 @@ class PulseAudioOutputStream : public AudioOutputStream {
// Close() helper function to free internal structs.
void Reset();
- // Returns the current hardware latency value in bytes.
- int GetHardwareLatencyInBytes();
-
- // Helper method for waiting on Pulse Audio operations to complete.
- void WaitForPulseOperation(pa_operation* op);
+ // Wrapper class to invoke all the Pulse functions.
+ PulseWrapper* wrapper_;
// AudioParameters from the constructor.
const AudioParameters params_;

Powered by Google App Engine
This is Rietveld 408576698