Permalink
Browse files

Documentation update.

  • Loading branch information...
sritterbusch committed Apr 5, 2016
1 parent a23801f commit aac70d9967b630408229e20d1e9a1076e0024ba8
Showing with 62 additions and 1 deletion.
  1. BIN ospac-internal.pdf
  2. +0 −1 src/Analyzer.h
  3. +62 −0 src/Encode.h
View
Binary file not shown.
View
@@ -33,7 +33,6 @@ class Analyzer
* Analysis of frequency band distribution if activity is detected
* for fixed cut-off frequencies 100Hz, 500Hz, 2.5k, 4k
* @param c audio channel to work on
* @param frequencies n cut-off frequencies
* @return resulting l2 normalized n+1 l2 energy levels
*/
static std::vector<double> bandedAnalysis(const Channel & c);
View
@@ -21,6 +21,9 @@
class Encode
{
public:
/**
* General quality setting for all encoding formats
*/
enum QualitySetting { LOW, STANDARD, HIGH, INSANE};
private:
Channels &channels;
@@ -35,6 +38,10 @@ class Encode
QualitySetting quality;
public:
/**
* Builder pattern constructor from channels to encode.
* @param aChannels
*/
Encode(Channels &aChannels)
: channels(aChannels),
title(""),artist(""),album(""),
@@ -46,23 +53,78 @@ class Encode
}
/**
* Set title meta tag of encoded file to given title
* @param aTitle title to be set
* @return modified builder object
*/
Encode & Title(std::string aTitle) { title=aTitle; return *this; }
/**
* set artist meta tag of encoded file to given artist
* @param aArtist artist to be set
* @return modified builder object
*/
Encode & Artist(std::string aArtist) { artist=aArtist; return *this; }
/**
* set album meta tag of encoded file to given album
* @param aAlbum album to be set
* @return modified builder object
*/
Encode & Album(std::string aAlbum) { album=aAlbum; return *this; }
/**
* set comment meta tag of encoded file to given comment
* @param aComment comment to be set
* @return modified builder object
*/
Encode & Comment(std::string aComment) { comment=aComment; return *this; }
/**
* set category meta tag of encoded file to given category
* @param aCategory category to be set
* @return modified builder object
*/
Encode & Category(std::string aCategory) { category=aCategory; return *this; }
/**
* set episode meta tag of encoded file to given episode
* @param aEpisode episode to be set
* @return modified builder object
*/
Encode & Episode(std::string aEpisode) { episode=aEpisode; return *this; }
/**
* set year meta tag of encoded file to given year
* @param aYear year to be set
* @return modified builder object
*/
Encode & Year(std::string aYear) { year=aYear; return *this; }
/**
* set image meta tag of encoded file to given image if possible
* @param aImage image to be set
* @return modified builder object
*/
Encode & Image(std::string aImage) { image=aImage; return *this; }
/**
* set quality of encoding to given meta value
* @param aQuality quality meta value to be used
* @return modified builder object
*/
Encode & Quality(QualitySetting aQuality) { quality=aQuality; return *this; }
/**
* Create mp3 file from builder
* @param filename under which the encoded file shall be saved
* @return return value of external command
*/
int mp3(std::string filename)
{
return lame(channels,filename,quality,title,artist,album,comment,
image,category,episode,year);
}
/**
* Create ogg file from builder
* @param filename under which the encoded file shall be saved
* @return return value of external command
*/
int ogg(std::string filename)
{
return oggenc(channels,filename,quality,title,artist,album,comment,

0 comments on commit aac70d9

Please sign in to comment.