MistServer  2.5.3-Pro-19-gf5e75b1 ( Generic_64)
input_mp3.h
Go to the documentation of this file.
1 #include "input.h"
2 #include <mist/dtsc.h>
3 #include <deque>
4 
5 namespace Mist {
6  const static double sampleRates[2][3] = {{44.1, 48.0, 32.0}, {22.05, 24.0, 16.0}};
7  const static int sampleCounts[2][3] = {{374, 1152, 1152}, {384, 1152, 576}};
8  const static int bitRates[2][3][16] = {{{0, 32, 64, 96, 128, 160, 192, 224, 256, 288, 320, 352, 384, 416, 448, -1},
9  {0, 32, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384, -1},
10  {0, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, -1}},
11  {{0, 32, 48, 56, 64, 80, 96, 112, 128, 144, 160, 176, 192, 224, 256, -1},
12  {0, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160, -1},
13  {0, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160, -1}}};
14  class inputMP3 : public Input {
15  public:
16  inputMP3(Util::Config * cfg);
17  protected:
18  //Private Functions
19  bool setup();
20  bool readHeader();
21  void getNext(bool smart = true);
22  void seek(int seekTime);
23  void trackSelect(std::string trackSpec);
24  double timestamp;
25 
26  FILE * inFile;
27  };
28 }
29 
31 
FILE * inFile
Definition: input_mp3.h:26
static const int bitRates[2][3][16]
Definition: input_mp3.h:8
bool setup()
Definition: input_mp3.cpp:24
Definition: input_mp3.h:14
static const double sampleRates[2][3]
Definition: input_mp3.h:6
Definition: input.h:19
Recording to file.
Definition: input.cpp:13
inputMP3(Util::Config *cfg)
Definition: input_mp3.cpp:15
double timestamp
Definition: input_mp3.h:24
static const int sampleCounts[2][3]
Definition: input_mp3.h:7
Deals with parsing configuration from commandline options.
Definition: config.h:18
bool readHeader()
Definition: input_mp3.cpp:49
Mist::inputMP3 mistIn
Definition: input_mp3.h:30
void seek(int seekTime)
Definition: input_mp3.cpp:179
void getNext(bool smart=true)
Definition: input_mp3.cpp:102
void trackSelect(std::string trackSpec)
Definition: input_mp3.cpp:191