Twitch SDK (Internal)
ipcmaudioframereceiver.h
Go to the documentation of this file.
1 /********************************************************************************************
2 * Twitch Broadcasting SDK
3 *
4 * This software is supplied under the terms of a license agreement with Twitch Interactive, Inc. and
5 * may not be copied or used except in accordance with the terms of that agreement
6 * Copyright (c) 2012-2016 Twitch Interactive, Inc.
7 *********************************************************************************************/
8 
9 #pragma once
10 
13 #include <memory>
14 
15 namespace ttv
16 {
17  namespace broadcast
18  {
19  class IPcmAudioFrameReceiver;
20  class AudioFrame;
21  }
22 }
23 
24 
29 {
30 public:
35  virtual TTV_ErrorCode GetNumPcmSamplesPerFrame(uint32_t& result) const = 0;
36 
41  virtual TTV_ErrorCode PackageFrame(const uint8_t* sampleBuffer, uint32_t numSamplesPerChannel, uint32_t numChannels, bool interleaved, AudioSampleFormat audioSampleFormat, uint64_t timeStamp, std::shared_ptr<AudioFrame>& result) = 0;
42 
43  static ReceiverTypeId GetReceiverTypeId() { static int typeId = 0; return reinterpret_cast<ReceiverTypeId>(&typeId); }
44 };
Definition: iaudioframereceiver.h:25
Definition: ipcmaudioframereceiver.h:28
JSON (JavaScript Object Notation).
Definition: adsapi.h:16
virtual TTV_ErrorCode PackageFrame(const uint8_t *sampleBuffer, uint32_t numSamplesPerChannel, uint32_t numChannels, bool interleaved, AudioSampleFormat audioSampleFormat, uint64_t timeStamp, std::shared_ptr< AudioFrame > &result)=0
uint32_t TTV_ErrorCode
Definition: errortypes.h:30
static ReceiverTypeId GetReceiverTypeId()
Definition: ipcmaudioframereceiver.h:43
size_t ReceiverTypeId
Definition: iaudioframereceiver.h:28
AudioSampleFormat
Definition: broadcasttypes.h:177
virtual TTV_ErrorCode GetNumPcmSamplesPerFrame(uint32_t &result) const =0