Twitch SDK (Internal)
pcmaudioframe.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  * This file was automatically generated. Do not edit manually.
9  *********************************************************************************************/
10 
11 #pragma once
12 
16 
17 
18 namespace ttv
19 {
20  namespace broadcast
21  {
22  class PcmAudioFrame;
23  class PcmAudioReceiver;
24  }
25 }
26 
27 
29 {
30 public:
31  PcmAudioFrame(const uint8_t* sampleBuffer, uint32_t numSamplesPerChannel, uint32_t numChannels, bool interleaved, AudioSampleFormat audioSampleFormat, uint64_t timeStamp);
32 
33  const std::vector<uint8_t>& GetSampleBuffer() const { return mSampleBuffer; }
35  uint32_t GetNumSamplesPerChannel() const { return mNumSamplesPerChannel; }
36  bool GetInterleaved() const { return mInterleaved; }
37 
38 private:
39  std::vector<uint8_t> mSampleBuffer;
43 };
44 
45 
47 {
48 public:
49  PcmAudioReceiver(uint32_t numPcmSamplesPerFrame);
50 
51 public:
52  virtual TTV_ErrorCode GetNumPcmSamplesPerFrame(uint32_t& result) const override;
53  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) override;
54 
55 private:
57 };
Definition: ipcmaudioframereceiver.h:28
std::vector< uint8_t > mSampleBuffer
Definition: pcmaudioframe.h:39
uint32_t mNumSamplesPerChannel
Definition: pcmaudioframe.h:41
Definition: pcmaudioframe.h:46
AudioSampleFormat GetAudioSampleFormat() const
Definition: pcmaudioframe.h:34
PcmAudioFrame(const uint8_t *sampleBuffer, uint32_t numSamplesPerChannel, uint32_t numChannels, bool interleaved, AudioSampleFormat audioSampleFormat, uint64_t timeStamp)
JSON (JavaScript Object Notation).
Definition: adsapi.h:16
const std::vector< uint8_t > & GetSampleBuffer() const
Definition: pcmaudioframe.h:33
bool GetInterleaved() const
Definition: pcmaudioframe.h:36
bool mInterleaved
Definition: pcmaudioframe.h:42
Definition: pcmaudioframe.h:28
AudioSampleFormat mAudioSampleFormat
Definition: pcmaudioframe.h:40
uint32_t TTV_ErrorCode
Definition: errortypes.h:30
AudioSampleFormat
Definition: broadcasttypes.h:177
uint32_t GetNumSamplesPerChannel() const
Definition: pcmaudioframe.h:35
uint32_t mNumPcmSamplesPerFrame
Definition: pcmaudioframe.h:56
Definition: audioframe.h:25