15 #ifndef SHAKA_EMBEDDED_MEDIA_AUDIO_RENDERER_COMMON_H_ 16 #define SHAKA_EMBEDDED_MEDIA_AUDIO_RENDERER_COMMON_H_ 65 double Volume()
const override;
67 bool Muted()
const override;
78 enum class SyncStatus {
96 virtual bool InitDevice(std::shared_ptr<DecodedFrame>
frame,
107 virtual bool AppendBuffer(
const uint8_t* data,
size_t size) = 0;
110 virtual void ClearBuffer() = 0;
117 virtual size_t GetBytesBuffered()
const = 0;
120 virtual void SetDeviceState(
bool is_playing) = 0;
127 virtual void UpdateVolume(
double volume) = 0;
130 bool FillSilence(
size_t bytes);
137 bool IsFrameSimilar(std::shared_ptr<DecodedFrame> frame1,
138 std::shared_ptr<DecodedFrame> frame2)
const;
140 bool WriteFrame(std::shared_ptr<DecodedFrame> frame,
size_t sync_bytes);
149 void OnPlaybackRateChanged(
double old_rate,
double new_rate)
override;
150 void OnSeeking()
override;
154 mutable Mutex mutex_;
161 std::shared_ptr<DecodedFrame> cur_frame_;
163 uint64_t bytes_written_;
175 #endif // SHAKA_EMBEDDED_MEDIA_AUDIO_RENDERER_COMMON_H_
std::shared_ptr< shaka::media::DecodedFrame > frame