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

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: Fix build error Created 6 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: ppapi/cpp/audio_frame.cc
diff --git a/ppapi/cpp/audio_frame.cc b/ppapi/cpp/audio_frame.cc
index 7c3a1bbf894857e2f2d0ad93a0b7a099e6986976..feb038ac9a35496e5cd7d4556590e201146154ef 100644
--- a/ppapi/cpp/audio_frame.cc
+++ b/ppapi/cpp/audio_frame.cc
@@ -44,10 +44,16 @@ void AudioFrame::SetTimestamp(PP_TimeDelta timestamp) {
get_interface<PPB_AudioFrame_0_1>()->SetTimestamp(pp_resource(), timestamp);
}
-uint32_t AudioFrame::GetSampleSize() const {
+PP_AudioFrame_SampleRate AudioFrame::GetSampleRate() const {
+ if (has_interface<PPB_AudioFrame_0_1>())
+ return get_interface<PPB_AudioFrame_0_1>()->GetSampleRate(pp_resource());
+ return PP_AUDIOFRAME_SAMPLERATE_UNKNOWN;
+}
+
+PP_AudioFrame_SampleSize AudioFrame::GetSampleSize() const {
if (has_interface<PPB_AudioFrame_0_1>())
return get_interface<PPB_AudioFrame_0_1>()->GetSampleSize(pp_resource());
- return 0;
+ return PP_AUDIOFRAME_SAMPLESIZE_UNKNOWN;
}
uint32_t AudioFrame::GetNumberOfChannels() const {

Powered by Google App Engine
This is Rietveld 408576698