1 // Copyright 2014 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef PPAPI_THUNK_PPB_AUDIO_BUFFER_API_H_ 6 #define PPAPI_THUNK_PPB_AUDIO_BUFFER_API_H_ 7 8 #include <stdint.h> 9 10 #include "ppapi/c/ppb_audio_buffer.h" 11 #include "ppapi/thunk/ppapi_thunk_export.h" 12 13 namespace ppapi { 14 15 union MediaStreamBuffer; 16 17 namespace thunk { 18 19 class PPAPI_THUNK_EXPORT PPB_AudioBuffer_API { 20 public: ~PPB_AudioBuffer_API()21 virtual ~PPB_AudioBuffer_API() {} 22 virtual PP_TimeDelta GetTimestamp() = 0; 23 virtual void SetTimestamp(PP_TimeDelta timestamp) = 0; 24 virtual PP_AudioBuffer_SampleRate GetSampleRate() = 0; 25 virtual PP_AudioBuffer_SampleSize GetSampleSize() = 0; 26 virtual uint32_t GetNumberOfChannels() = 0; 27 virtual uint32_t GetNumberOfSamples() = 0; 28 virtual void* GetDataBuffer() = 0; 29 virtual uint32_t GetDataBufferSize() = 0; 30 31 // Methods used by Pepper internal implementation only. 32 virtual MediaStreamBuffer* GetBuffer() = 0; 33 virtual int32_t GetBufferIndex() = 0; 34 virtual void Invalidate() = 0; 35 }; 36 37 } // namespace thunk 38 } // namespace ppapi 39 40 #endif // PPAPI_THUNK_PPB_AUDIO_BUFFER_API_H_ 41