Mixxx

/home/maxime/Projets/Mixxx/1.10/mixxx/src/recording/encoder.cpp

Go to the documentation of this file.
00001 /****************************************************************************
00002                    encoder.cpp  - encoder API for mixxx
00003                              -------------------
00004     copyright            : (C) 2009 by Phillip Whelan
00005     copyright            : (C) 2010 by Tobias Rafreider
00006  ***************************************************************************/
00007 
00008 /***************************************************************************
00009  *                                                                         *
00010  *   This program is free software; you can redistribute it and/or modify  *
00011  *   it under the terms of the GNU General Public License as published by  *
00012  *   the Free Software Foundation; either version 2 of the License, or     *
00013  *   (at your option) any later version.                                   *
00014  *                                                                         *
00015  ***************************************************************************/
00016 
00017 #include <stdlib.h> // needed for random num gen
00018 #include <time.h> // needed for random num gen
00019 #include <string.h> // needed for memcpy
00020 #include <QDebug>
00021 
00022 #include "engine/engineabstractrecord.h"
00023 #include "controlobjectthreadmain.h"
00024 #include "controlobject.h"
00025 #include "playerinfo.h"
00026 #include "trackinfoobject.h"
00027 
00028 #include "encoder.h"
00029 
00030 // Constructor
00031 Encoder::Encoder() {
00032 }
00033 
00034 // Destructor
00035 Encoder::~Encoder() {
00036 }
00037 
00038 int Encoder::convertToBitrate(int quality) {
00039     switch(quality)
00040     {
00041         case 1: return 48;
00042         case 2: return 64;
00043         case 3: return 80;
00044         case 4: return 96;
00045         case 5: return 112;
00046         case 6: return 128;
00047         case 7: return 160;
00048         case 8: return 192;
00049         case 9: return 224;
00050         case 10: return 256;
00051         case 11: return 320;
00052         default: return 128;
00053     }
00054 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines