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

Unified Diff: ppapi/cpp/audio_frame.cc

Issue 140783004: [PPAPI] Pepper MediaStream API audio track implementation and example. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update Created 6 years, 11 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: ppapi/cpp/audio_frame.cc
diff --git a/ppapi/cpp/audio_frame.cc b/ppapi/cpp/audio_frame.cc
index 7c3a1bbf894857e2f2d0ad93a0b7a099e6986976..538b689729edbc3a72a71c0f922c9c5366317cd3 100644
--- a/ppapi/cpp/audio_frame.cc
+++ b/ppapi/cpp/audio_frame.cc
@@ -44,6 +44,12 @@ void AudioFrame::SetTimestamp(PP_TimeDelta timestamp) {
get_interface<PPB_AudioFrame_0_1>()->SetTimestamp(pp_resource(), timestamp);
}
+PP_AudioSampleRate AudioFrame::GetSampleRate() const {
+ if (has_interface<PPB_AudioFrame_0_1>())
+ return get_interface<PPB_AudioFrame_0_1>()->GetSampleRate(pp_resource());
+ return PP_AUDIOSAMPLERATE_NONE;
+}
+
uint32_t AudioFrame::GetSampleSize() const {
if (has_interface<PPB_AudioFrame_0_1>())
return get_interface<PPB_AudioFrame_0_1>()->GetSampleSize(pp_resource());

Powered by Google App Engine
This is Rietveld 408576698