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

Unified Diff: media/audio/android/audio_manager_android.cc

Issue 2466463005: Support (E)AC3 passthrough
Patch Set: Improve CastMediaClient::IsSupportedPassthroughAudio() Created 4 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
Index: media/audio/android/audio_manager_android.cc
diff --git a/media/audio/android/audio_manager_android.cc b/media/audio/android/audio_manager_android.cc
index b6d339abf93b10def078fdc63942dd9d375db1c8..bf7274dcc31c49bccac3ba0a3d2974729c858841 100644
--- a/media/audio/android/audio_manager_android.cc
+++ b/media/audio/android/audio_manager_android.cc
@@ -15,6 +15,7 @@
#include "base/strings/string_number_conversions.h"
#include "jni/AudioManagerAndroid_jni.h"
#include "media/audio/android/audio_record_input.h"
+#include "media/audio/android/audio_track_output_stream.h"
#include "media/audio/android/opensles_input.h"
#include "media/audio/android/opensles_output.h"
#include "media/audio/audio_device_description.h"
@@ -168,7 +169,7 @@ AudioOutputStream* AudioManagerAndroid::MakeAudioOutputStream(
DCHECK(GetTaskRunner()->BelongsToCurrentThread());
AudioOutputStream* stream = AudioManagerBase::MakeAudioOutputStream(
params, std::string(), AudioManager::LogCallback());
- streams_.insert(static_cast<OpenSLESOutputStream*>(stream));
+ streams_.insert(static_cast<MuteableAudioOutputStream*>(stream));
return stream;
}
@@ -194,7 +195,7 @@ AudioInputStream* AudioManagerAndroid::MakeAudioInputStream(
void AudioManagerAndroid::ReleaseOutputStream(AudioOutputStream* stream) {
DCHECK(GetTaskRunner()->BelongsToCurrentThread());
- streams_.erase(static_cast<OpenSLESOutputStream*>(stream));
+ streams_.erase(static_cast<MuteableAudioOutputStream*>(stream));
AudioManagerBase::ReleaseOutputStream(stream);
}
@@ -232,6 +233,14 @@ AudioOutputStream* AudioManagerAndroid::MakeLowLatencyOutputStream(
return new OpenSLESOutputStream(this, params, stream_type);
}
+AudioOutputStream* AudioManagerAndroid::MakeRawOutputStream(
+ const AudioParameters& params,
+ const std::string& device_id,
+ const LogCallback& log_callback) {
+ DCHECK(params.IsRawFormat());
+ return new AudioTrackOutputStream(this, params);
+}
+
AudioInputStream* AudioManagerAndroid::MakeLinearInputStream(
const AudioParameters& params,
const std::string& device_id,

Powered by Google App Engine
This is Rietveld 408576698