Twitch SDK (Internal)
wavefilewriter.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 
14 
15 namespace ttv
16 {
17  namespace broadcast
18  {
19  class WaveFileWriter;
20  }
21 }
22 
24 {
25 public:
28 
29  bool Open(const std::string& path, uint sampleRate, uint numChannels, bool isFloat);
30  bool WriteSamples(const float* samples, uint numSamples);
31  bool WriteSamples(const int16_t* samples, uint numSamples);
32  bool Close();
33 
34  float GetDuration() const { return mDuration; }
35 
36 private:
37  void WriteWaveHeader(uint fileLength);
38 
39  FILE* mFile;
42  float mDuration;
43  bool mIsFloat;
44 };
FILE * mFile
Definition: wavefilewriter.h:39
float GetDuration() const
Definition: wavefilewriter.h:34
bool WriteSamples(const float *samples, uint numSamples)
void WriteWaveHeader(uint fileLength)
bool Open(const std::string &path, uint sampleRate, uint numChannels, bool isFloat)
JSON (JavaScript Object Notation).
Definition: adsapi.h:16
Definition: wavefilewriter.h:23
uint mSampleRate
Definition: wavefilewriter.h:40
uint mNumChannels
Definition: wavefilewriter.h:41
unsigned int uint
Definition: coretypes.h:18
bool mIsFloat
Definition: wavefilewriter.h:43
float mDuration
Definition: wavefilewriter.h:42