libsaria: Remove commented out code
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
This commit is contained in:
parent
0d05e14724
commit
f487a08ac1
|
@ -1,6 +1,4 @@
|
|||
// Copyright (c) 2011 Bryan Schumaker.
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <libsaria/libsaria.h>
|
||||
#include <libsaria/library.h>
|
||||
#include <libsaria/format.h>
|
||||
|
@ -12,15 +10,6 @@
|
|||
#include <libsaria/deck.h>
|
||||
#include <libsaria/idle.h>
|
||||
#include <libsaria/fs.h>
|
||||
/*#include <libsaria/audio.h>
|
||||
#include <libsaria/path.h>
|
||||
#include <libsaria/prefs.h>
|
||||
#include <libsaria/print.h>
|
||||
#include <libsaria/library.h>
|
||||
#include <libsaria/format.h>
|
||||
#include <libsaria/index.h>
|
||||
#include <libsaria/stack.h>
|
||||
*/
|
||||
|
||||
static libsaria::Track outside_track;
|
||||
|
||||
|
@ -40,13 +29,9 @@ namespace libsaria
|
|||
|
||||
audio::init(argc, argv);
|
||||
|
||||
/*println("saria dir: %s", get_saria_dir().c_str());
|
||||
make_saria_dir();*/
|
||||
|
||||
libsaria::deck::init();
|
||||
libsaria::library::init();
|
||||
libsaria::deck::load_all();
|
||||
/*libsaria::stack_init();*/
|
||||
}
|
||||
|
||||
void quit()
|
||||
|
|
|
@ -24,16 +24,6 @@ namespace libsaria
|
|||
return album;
|
||||
}
|
||||
|
||||
/*string Track::get_comment()
|
||||
{
|
||||
return comment;
|
||||
}
|
||||
|
||||
string Track::get_genre()
|
||||
{
|
||||
return genre;
|
||||
}*/
|
||||
|
||||
string &Track::get_lenstr()
|
||||
{
|
||||
return lenstr;
|
||||
|
@ -64,24 +54,4 @@ namespace libsaria
|
|||
return path->id;
|
||||
}
|
||||
|
||||
/* int Track::get_length()
|
||||
{
|
||||
return length;
|
||||
}
|
||||
|
||||
int Track::get_bitrate()
|
||||
{
|
||||
return bitrate;
|
||||
}
|
||||
|
||||
int Track::get_channels()
|
||||
{
|
||||
return channels;
|
||||
}
|
||||
|
||||
sid_t Track::get_songid()
|
||||
{
|
||||
return songid;
|
||||
}*/
|
||||
|
||||
} /* Namespace: libsaria */
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
#include <libsaria/track.h>
|
||||
#include <libsaria/audio.h>
|
||||
#include <libsaria/print.h>
|
||||
/*#include <libsaria/library.h>
|
||||
#include <libsaria/index.h>*/
|
||||
|
||||
#include <taglib/tag.h>
|
||||
#include <taglib/fileref.h>
|
||||
|
@ -152,77 +150,6 @@ namespace libsaria
|
|||
return cur;
|
||||
}
|
||||
|
||||
/* Track::Track()
|
||||
{
|
||||
}
|
||||
|
||||
Track::Track(string file, sid_t sid)
|
||||
{
|
||||
TagLib::Tag *tag;
|
||||
TagLib::AudioProperties *prop;
|
||||
TagLib::FileRef ref(file.c_str());
|
||||
|
||||
if (ref.isNull())
|
||||
throw "Error tagging file: " + file;
|
||||
|
||||
filepath = file;
|
||||
songid = sid;*/
|
||||
|
||||
/* Extract tags */
|
||||
/* tag = ref.tag();
|
||||
title = tag->title().to8Bit(true);
|
||||
artist = tag->artist().to8Bit(true);
|
||||
album = tag->album().to8Bit(true);
|
||||
comment = tag->comment().to8Bit(true);
|
||||
genre = tag->genre().to8Bit(true);
|
||||
year = tag->year();
|
||||
track = tag->track();*/
|
||||
|
||||
/* Extract audio properties */
|
||||
/* prop = ref.audioProperties();
|
||||
length = prop->length();
|
||||
bitrate = prop->bitrate();
|
||||
sample = prop->sampleRate();
|
||||
channels = prop->channels();
|
||||
|
||||
make_lenstr();
|
||||
do_bookkeeping();
|
||||
}
|
||||
|
||||
Track::Track(InFile &in)
|
||||
{
|
||||
in >> songid;
|
||||
in >> filepath;
|
||||
in >> title;
|
||||
in >> artist;
|
||||
in >> album;
|
||||
in >> comment;
|
||||
in >> genre;
|
||||
in >> lenstr;
|
||||
in >> year;
|
||||
in >> track;
|
||||
in >> length;
|
||||
in >> bitrate;
|
||||
in >> sample;
|
||||
in >> channels;
|
||||
do_bookkeeping();
|
||||
}
|
||||
|
||||
Track::~Track() {}
|
||||
|
||||
void Track::do_cleanup()
|
||||
{
|
||||
//libsaria::library::unlist_track(this);
|
||||
}
|
||||
|
||||
void Track::do_bookkeeping()
|
||||
{
|
||||
artist_lc = lowercase(artist);
|
||||
album_lc = lowercase(album);
|
||||
libsaria::index::add_track(this);
|
||||
//libsaria::library::list_track(this);
|
||||
}
|
||||
*/
|
||||
void Track::save(ofstream &out)
|
||||
{
|
||||
out << filepath << "\n";
|
||||
|
@ -244,21 +171,5 @@ namespace libsaria
|
|||
out << sample << " ";
|
||||
out << channels << "\n";
|
||||
}
|
||||
/*
|
||||
void Track::make_lenstr()
|
||||
{
|
||||
int minutes;
|
||||
int seconds;
|
||||
stringstream stream;*/
|
||||
|
||||
/* Convert length into mm:ss format */
|
||||
/* minutes = length / 60;
|
||||
seconds = length - (minutes * 60);
|
||||
stream << minutes << ":";
|
||||
if (seconds < 10)
|
||||
stream << "0";
|
||||
stream << seconds;
|
||||
lenstr = stream.str();
|
||||
}*/
|
||||
|
||||
} /* Namespace: libsaria */
|
||||
|
|
Loading…
Reference in New Issue