You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tdemultimedia/noatun/modules/winskin/fileInfo.cpp

51 lines
771 B

#include <noatun/app.h>
#include <noatun/playlist.h>
#include <tqstring.h>
#include <kfilemetainfo.h>
#include "fileInfo.h"
fileInfo::fileInfo(const PlaylistItem &item)
{
TQString prop;
prop = item.property("bitrate");
if (prop.isNull())
_bps = 0;
else
_bps = prop.toInt();
prop = item.property("samplerate");
if (prop.isNull())
_KHz = 44100;
else
_KHz = prop.toInt();
prop = item.property("channels");
if (prop.isNull())
_channelCount = 2;
else
_channelCount = prop.toInt();
}
fileInfo::~fileInfo()
{
}
unsigned int fileInfo::bps()
{
return _bps;
}
unsigned int fileInfo::KHz()
{
return _KHz;
}
unsigned int fileInfo::channelCount()
{
return _channelCount;
}