From c801ce1a2d508352959516de8d936ad5ce2d1f1f Mon Sep 17 00:00:00 2001 From: John Maguire Date: Sat, 28 Aug 2010 18:48:16 +0000 Subject: [PATCH] Rollback analyzer changes. --- data/data.qrc | 2 - data/shaders/glblock_frag.glsl | 5 - data/shaders/glblock_vert.glsl | 7 - dist/macdeploy.py | 1 - src/CMakeLists.txt | 15 +- src/analyzers/analyzer.h | 26 --- src/analyzers/analyzerbase.cpp | 96 +++++++++-- src/analyzers/analyzerbase.h | 44 ++++- src/analyzers/analyzercontainer.cpp | 36 +---- src/analyzers/analyzercontainer.h | 4 +- src/analyzers/baranalyzer.cpp | 2 +- src/analyzers/blockanalyzer.cpp | 30 +++- src/analyzers/blockanalyzer.h | 6 +- src/analyzers/boomanalyzer.cpp | 22 ++- src/analyzers/boomanalyzer.h | 1 + src/analyzers/glbaranalyzer.cpp | 123 -------------- src/analyzers/glbaranalyzer.h | 36 ----- src/analyzers/glblockanalyzer.cpp | 155 ------------------ src/analyzers/glblockanalyzer.h | 41 ----- src/analyzers/sonogram.cpp | 21 ++- src/analyzers/sonogram.h | 1 + src/core/fht.cpp | 242 ++++++++++++++++++++++++++++ src/core/fht.h | 119 ++++++++++++++ src/engines/enginebase.h | 4 - src/engines/gstengine.cpp | 15 +- src/engines/gstengine.h | 4 - src/engines/gstenginepipeline.cpp | 58 +------ src/engines/gstenginepipeline.h | 12 +- src/main.cpp | 5 +- src/translations/ar.po | 14 +- src/translations/bg.po | 14 +- src/translations/ca.po | 18 +-- src/translations/cs.po | 14 +- src/translations/da.po | 14 +- src/translations/de.po | 14 +- src/translations/el.po | 14 +- src/translations/en_CA.po | 14 +- src/translations/en_GB.po | 14 +- src/translations/es.po | 14 +- src/translations/fi.po | 14 +- src/translations/fr.po | 14 +- src/translations/gl.po | 14 +- src/translations/hu.po | 14 +- src/translations/it.po | 14 +- src/translations/kk.po | 14 +- src/translations/lt.po | 14 +- src/translations/nb.po | 14 +- src/translations/nl.po | 14 +- src/translations/oc.po | 14 +- src/translations/pl.po | 14 +- src/translations/pt.po | 14 +- src/translations/pt_BR.po | 14 +- src/translations/ro.po | 14 +- src/translations/ru.po | 14 +- src/translations/sk.po | 14 +- src/translations/sl.po | 14 +- src/translations/sr.po | 14 +- src/translations/sv.po | 14 +- src/translations/tr.po | 14 +- src/translations/translations.pot | 12 +- src/translations/uk.po | 14 +- src/translations/zh_CN.po | 14 +- src/translations/zh_TW.po | 14 +- 63 files changed, 811 insertions(+), 800 deletions(-) delete mode 100644 data/shaders/glblock_frag.glsl delete mode 100644 data/shaders/glblock_vert.glsl delete mode 100644 src/analyzers/analyzer.h delete mode 100644 src/analyzers/glbaranalyzer.cpp delete mode 100644 src/analyzers/glbaranalyzer.h delete mode 100644 src/analyzers/glblockanalyzer.cpp delete mode 100644 src/analyzers/glblockanalyzer.h create mode 100644 src/core/fht.cpp create mode 100644 src/core/fht.h diff --git a/data/data.qrc b/data/data.qrc index cf7b04e13..f8f4933af 100644 --- a/data/data.qrc +++ b/data/data.qrc @@ -261,8 +261,6 @@ icons/22x22/ipodtouchicon.png icons/32x32/ipodtouchicon.png icons/48x48/ipodtouchicon.png - shaders/glblock_vert.glsl - shaders/glblock_frag.glsl icons/32x32/wiimotedev.png diff --git a/data/shaders/glblock_frag.glsl b/data/shaders/glblock_frag.glsl deleted file mode 100644 index fa4f5465e..000000000 --- a/data/shaders/glblock_frag.glsl +++ /dev/null @@ -1,5 +0,0 @@ -void main() { - vec4 color = gl_Color * gl_TexCoord[0].t; - color.r = pow(color.r, 0.5); - gl_FragColor = color; -} diff --git a/data/shaders/glblock_vert.glsl b/data/shaders/glblock_vert.glsl deleted file mode 100644 index 5d582819f..000000000 --- a/data/shaders/glblock_vert.glsl +++ /dev/null @@ -1,7 +0,0 @@ -void main() { - gl_FrontColor = gl_Color; - gl_Position = ftransform(); - - gl_TexCoord[0].st = gl_Vertex.xy; - gl_TexCoord[0].pq = gl_MultiTexCoord0.xy; -} diff --git a/dist/macdeploy.py b/dist/macdeploy.py index 410a70de3..c99570366 100755 --- a/dist/macdeploy.py +++ b/dist/macdeploy.py @@ -64,7 +64,6 @@ GSTREAMER_PLUGINS=[ 'libgstdecodebin2.so', 'libgstequalizer.so', 'libgstosxaudio.so', - 'libgstspectrum.so', 'libgsttypefindfunctions.so', 'libgstudp.so', 'libgstvolume.so', diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c214fe1c3..20c564b5f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -30,10 +30,6 @@ set(SOURCES analyzers/sonogram.cpp analyzers/turbine.cpp - analyzers/analyzer.cpp - analyzers/glbaranalyzer.cpp - analyzers/glblockanalyzer.cpp - core/albumcoverfetcher.cpp core/albumcoverloader.cpp core/backgroundthread.cpp @@ -42,6 +38,7 @@ set(SOURCES core/deletefiles.cpp core/encoding.cpp core/filesystemmusicstorage.cpp + core/fht.cpp core/globalshortcutbackend.cpp core/globalshortcuts.cpp core/gnomeglobalshortcutbackend.cpp @@ -151,6 +148,7 @@ set(SOURCES widgets/fileview.cpp widgets/fileviewlist.cpp widgets/freespacebar.cpp + widgets/lineedit.cpp widgets/linetextedit.cpp widgets/multiloadingindicator.cpp widgets/nowplayingwidget.cpp @@ -163,7 +161,6 @@ set(SOURCES widgets/stretchheaderview.cpp widgets/trackslider.cpp widgets/tracksliderslider.cpp - widgets/lineedit.cpp ) set(HEADERS @@ -175,10 +172,6 @@ set(HEADERS analyzers/sonogram.h analyzers/turbine.h - analyzers/analyzer.h - analyzers/glbaranalyzer.h - analyzers/glblockanalyzer.h - core/albumcoverfetcher.h core/albumcoverloader.h core/backgroundthread.h @@ -274,6 +267,7 @@ set(HEADERS widgets/fileview.h widgets/fileviewlist.h widgets/freespacebar.h + widgets/lineedit.h widgets/linetextedit.h widgets/multiloadingindicator.h widgets/nowplayingwidget.h @@ -285,7 +279,6 @@ set(HEADERS widgets/stickyslider.h widgets/stretchheaderview.h widgets/trackslider.h - widgets/lineedit.h ) set(UI @@ -441,8 +434,6 @@ if(APPLE) list(APPEND SOURCES ui/macsystemtrayicon.mm) list(APPEND HEADERS core/macglobalshortcutbackend.h) list(APPEND HEADERS ui/macsystemtrayicon.h) - list(APPEND SOURCES widgets/maclineedit.mm) - list(APPEND HEADERS widgets/maclineedit.h) include_directories(${GROWL}/Headers) else(APPLE) if(WIN32) diff --git a/src/analyzers/analyzer.h b/src/analyzers/analyzer.h deleted file mode 100644 index 61c075af4..000000000 --- a/src/analyzers/analyzer.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef ANALYZER_H -#define ANALYZER_H - -#include -#include - -#include "engines/engine_fwd.h" - -class AnalyzerBase : public QGLWidget { - Q_OBJECT - public: - AnalyzerBase(QWidget* parent = 0); - - public slots: - void set_engine(Engine::Base* engine); - - protected slots: - virtual void SpectrumAvailable(const QVector& spectrum) = 0; - - private: - - protected: - Engine::Base* engine_; -}; - -#endif diff --git a/src/analyzers/analyzerbase.cpp b/src/analyzers/analyzerbase.cpp index 01cef161d..2ad9a620b 100644 --- a/src/analyzers/analyzerbase.cpp +++ b/src/analyzers/analyzerbase.cpp @@ -42,22 +42,40 @@ template class Analyzer::Base; #endif -Analyzer::Base::Base(QWidget *parent) - : QWidget(parent) +Analyzer::Base::Base( QWidget *parent, uint scopeSize ) + : QWidget( parent ) + , m_timeout( 40 ) // msec + , m_fht( new FHT(scopeSize) ) , m_engine(NULL) - , m_lastScope(200) + , m_lastScope(512) { } -void Analyzer::Base::set_engine(Engine::Base* engine) { - m_engine = engine; - connect(m_engine, SIGNAL(SpectrumAvailable(const QVector&)), - SLOT(SpectrumAvailable(const QVector&))); +void Analyzer::Base::hideEvent(QHideEvent *) { + m_timer.stop(); } -void Analyzer::Base::SpectrumAvailable(const QVector& spectrum) { - m_lastScope = spectrum; - update(); +void Analyzer::Base::showEvent(QShowEvent *) { + m_timer.start(timeout(), this); +} + +void Analyzer::Base::transform( Scope &scope ) //virtual +{ + //this is a standard transformation that should give + //an FFT scope that has bands for pretty analyzers + + //NOTE resizing here is redundant as FHT routines only calculate FHT::size() values + //scope.resize( m_fht->size() ); + + float *front = static_cast( &scope.front() ); + + float* f = new float[ m_fht->size() ]; + m_fht->copy( &f[0], front ); + m_fht->logSpectrum( front, &f[0] ); + m_fht->scale( front, 1.0 / 20 ); + + scope.resize( m_fht->size() / 2 ); //second half of values are rubbish + delete [] f; } void Analyzer::Base::paintEvent(QPaintEvent * e) @@ -71,7 +89,21 @@ void Analyzer::Base::paintEvent(QPaintEvent * e) { case Engine::Playing: { - analyze(p, m_lastScope); + const Engine::Scope &thescope = engine->scope(); + int i = 0; + + // convert to mono here - our built in analyzers need mono, but we the engines provide interleaved pcm + for( uint x = 0; (int)x < m_fht->size(); ++x ) + { + m_lastScope[x] = double(thescope[i] + thescope[i+1]) / (2*(1<<15)); + i += 2; + } + + transform( m_lastScope ); + analyze( p, m_lastScope ); + + //scope.resize( m_fht->size() ); + break; } case Engine::Paused: @@ -83,6 +115,40 @@ void Analyzer::Base::paintEvent(QPaintEvent * e) } } +int Analyzer::Base::resizeExponent( int exp ) +{ + if ( exp < 3 ) + exp = 3; + else if ( exp > 9 ) + exp = 9; + + if ( exp != m_fht->sizeExp() ) { + delete m_fht; + m_fht = new FHT( exp ); + } + return exp; +} + +int Analyzer::Base::resizeForBands( int bands ) +{ + int exp; + if ( bands <= 8 ) + exp = 4; + else if ( bands <= 16 ) + exp = 5; + else if ( bands <= 32 ) + exp = 6; + else if ( bands <= 64 ) + exp = 7; + else if ( bands <= 128 ) + exp = 8; + else + exp = 9; + + resizeExponent( exp ); + return m_fht->size() / 2; +} + void Analyzer::Base::paused(QPainter&) //virtual {} @@ -150,3 +216,11 @@ Analyzer::initSin( Scope &v, const uint size ) //static radian += step; } } + +void Analyzer::Base::timerEvent(QTimerEvent* e) { + QWidget::timerEvent(e); + if (e->timerId() != m_timer.timerId()) + return; + + update(); +} diff --git a/src/analyzers/analyzerbase.h b/src/analyzers/analyzerbase.h index 367825738..431e11d8f 100644 --- a/src/analyzers/analyzerbase.h +++ b/src/analyzers/analyzerbase.h @@ -9,10 +9,21 @@ #include #endif +#include "core/fht.h" //stack allocated and convenience #include "engines/engine_fwd.h" #include //stack allocated and convenience #include //stack allocated #include //baseclass +#include //included for convenience + +#include //baseclass +#ifdef Q_WS_MACX +#include //included for convenience +#include //included for convenience +#else +#include //included for convenience +#include //included for convenience +#endif class QEvent; class QPaintEvent; @@ -21,33 +32,54 @@ class QResizeEvent; namespace Analyzer { -typedef QVector Scope; +typedef std::vector Scope; class Base : public QWidget { Q_OBJECT -public slots: - void set_engine(Engine::Base* engine); - void SpectrumAvailable(const QVector& spectrum); +public: + ~Base() { delete m_fht; } + + uint timeout() const { return m_timeout; } + + void set_engine(EngineBase* engine) { m_engine = engine; } protected: - Base(QWidget* parent); + Base( QWidget*, uint scopeSize = 7 ); + void hideEvent(QHideEvent *); + void showEvent(QShowEvent *); void paintEvent( QPaintEvent* ); + void timerEvent(QTimerEvent *); void polishEvent(); + int resizeExponent( int ); + int resizeForBands( int ); virtual void init() {} - virtual void analyze(QPainter& p, const Scope&) = 0; + virtual void transform( Scope& ); + virtual void analyze( QPainter& p, const Scope& ) = 0; virtual void paused(QPainter& p); virtual void demo(QPainter& p); + void changeTimeout( uint newTimeout ) { + m_timeout = newTimeout; + if (m_timer.isActive()) { + m_timer.stop(); + m_timer.start(m_timeout, this); + } + } + protected: + QBasicTimer m_timer; + uint m_timeout; + FHT *m_fht; EngineBase* m_engine; Scope m_lastScope; }; + void interpolate( const Scope&, Scope& ); void initSin( Scope&, const uint = 6000 ); diff --git a/src/analyzers/analyzercontainer.cpp b/src/analyzers/analyzercontainer.cpp index 32682f616..e4f42616e 100644 --- a/src/analyzers/analyzercontainer.cpp +++ b/src/analyzers/analyzercontainer.cpp @@ -18,9 +18,6 @@ #include "baranalyzer.h" #include "blockanalyzer.h" #include "boomanalyzer.h" -#include "engines/enginebase.h" -#include "glbaranalyzer.h" -#include "glblockanalyzer.h" #include "sonogram.h" #include "turbine.h" @@ -47,6 +44,11 @@ AnalyzerContainer::AnalyzerContainer(QWidget *parent) setLayout(layout); layout->setContentsMargins(0, 0, 0, 0); + AddAnalyzerType(); + AddAnalyzerType(); + AddAnalyzerType(); + AddAnalyzerType(); + AddAnalyzerType(); connect(mapper_, SIGNAL(mapped(int)), SLOT(ChangeAnalyzer(int))); disable_action_ = context_menu_->addAction(tr("No analyzer"), this, SLOT(DisableAnalyzer())); @@ -60,14 +62,6 @@ AnalyzerContainer::AnalyzerContainer(QWidget *parent) double_click_timer_->setInterval(250); connect(double_click_timer_, SIGNAL(timeout()), SLOT(ShowPopupMenu())); - AddAnalyzerType(); - AddAnalyzerType(); - AddAnalyzerType(); - AddAnalyzerType(); - AddAnalyzerType(); - AddAnalyzerType(); - AddAnalyzerType(); - Load(); } @@ -105,21 +99,14 @@ void AnalyzerContainer::mouseDoubleClickEvent(QMouseEvent *) { void AnalyzerContainer::SetEngine(EngineBase *engine) { if (current_analyzer_) - QMetaObject::invokeMethod(current_analyzer_, "set_engine", Qt::DirectConnection, Q_ARG(Engine::Base*, engine)); + current_analyzer_->set_engine(engine); engine_ = engine; - if (engine_) { - engine_->SetSpectrum(current_analyzer_); - } } void AnalyzerContainer::DisableAnalyzer() { delete current_analyzer_; current_analyzer_ = NULL; - if (engine_) { - engine_->SetSpectrum(false); - } - Save(); } @@ -132,18 +119,11 @@ void AnalyzerContainer::ChangeAnalyzer(int id) { } delete current_analyzer_; - current_analyzer_ = qobject_cast(instance); - if (!current_analyzer_) { - current_analyzer_ = qobject_cast(instance); - } - QMetaObject::invokeMethod(current_analyzer_, "set_engine", Qt::DirectConnection, Q_ARG(Engine::Base*, engine_)); + current_analyzer_ = qobject_cast(instance); + current_analyzer_->set_engine(engine_); layout()->addWidget(current_analyzer_); - if (engine_) { - engine_->SetSpectrum(true); - } - Save(); } diff --git a/src/analyzers/analyzercontainer.h b/src/analyzers/analyzercontainer.h index 85cde380a..93549fbbc 100644 --- a/src/analyzers/analyzercontainer.h +++ b/src/analyzers/analyzercontainer.h @@ -24,8 +24,6 @@ #include "analyzerbase.h" #include "engines/engine_fwd.h" -#include "analyzer.h" - class AnalyzerContainer : public QWidget { Q_OBJECT @@ -66,7 +64,7 @@ private: QPoint last_click_pos_; bool ignore_next_click_; - QWidget* current_analyzer_; + Analyzer::Base* current_analyzer_; EngineBase* engine_; }; diff --git a/src/analyzers/baranalyzer.cpp b/src/analyzers/baranalyzer.cpp index fb99cdf18..33d9a99d9 100644 --- a/src/analyzers/baranalyzer.cpp +++ b/src/analyzers/baranalyzer.cpp @@ -20,7 +20,7 @@ const char* BarAnalyzer::kName = QT_TRANSLATE_NOOP("AnalyzerContainer", "Bar ana BarAnalyzer::BarAnalyzer( QWidget *parent ) - : Analyzer::Base(parent) + : Analyzer::Base( parent, 8 ) //, m_bands( BAND_COUNT ) //, barVector( BAND_COUNT, 0 ) //, roofVector( BAND_COUNT, 50 ) diff --git a/src/analyzers/blockanalyzer.cpp b/src/analyzers/blockanalyzer.cpp index 1ab351b95..419a8a6a6 100644 --- a/src/analyzers/blockanalyzer.cpp +++ b/src/analyzers/blockanalyzer.cpp @@ -24,7 +24,7 @@ const uint BlockAnalyzer::FADE_SIZE = 90; const char* BlockAnalyzer::kName = QT_TRANSLATE_NOOP("AnalyzerContainer", "Block analyzer"); BlockAnalyzer::BlockAnalyzer( QWidget *parent ) - : Analyzer::Base(parent) + : Analyzer::Base( parent, 9 ) , m_columns( 0 ) //uint , m_rows( 0 ) //uint , m_y( 0 ) //uint @@ -42,8 +42,6 @@ BlockAnalyzer::BlockAnalyzer( QWidget *parent ) // mxcl says null pixmaps cause crashes, so let's play it safe for ( uint i = 0; i < FADE_SIZE; ++i ) m_fade_bars[i] = QPixmap( 1, 1 ); - - time_.start(); } BlockAnalyzer::~BlockAnalyzer() @@ -84,6 +82,7 @@ BlockAnalyzer::resizeEvent( QResizeEvent *e ) m_yscale[m_rows] = 0; + determineStep(); paletteChange( palette() ); } @@ -98,7 +97,23 @@ BlockAnalyzer::determineStep() // I calculated the value 30 based on some trial and error const double fallTime = 30 * m_rows; - m_step = double(m_rows * time_.elapsed()) / fallTime; + m_step = double(m_rows * timeout()) / fallTime; +} + +void +BlockAnalyzer::transform( Analyzer::Scope &s ) //pure virtual +{ + for( uint x = 0; x < s.size(); ++x ) + s[x] *= 2; + + float *front = static_cast( &s.front() ); + + m_fht->spectrum( front ); + m_fht->scale( front, 1.0 / 20 ); + + //the second half is pretty dull, so only show it if the user has a large analyzer + //by setting to m_scope.size() if large we prevent interpolation of large analyzers, this is good! + s.resize( m_scope.size() <= MAX_COLUMNS/2 ? MAX_COLUMNS/2 : m_scope.size() ); } void @@ -116,7 +131,6 @@ BlockAnalyzer::analyze( QPainter& p, const Analyzer::Scope &s ) // m_yscale looks similar to: { 0.7, 0.5, 0.25, 0.15, 0.1, 0 } // if it contains 6 elements there are 5 rows in the analyzer - determineStep(); Analyzer::interpolate( s, m_scope ); @@ -158,10 +172,12 @@ BlockAnalyzer::analyze( QPainter& p, const Analyzer::Scope &s ) for( uint x = 0; x < m_store.size(); ++x ) p.drawPixmap(x*(WIDTH+1), int(m_store[x])*(HEIGHT+1) + m_y, m_topBarPixmap ); - - time_.restart(); } + + + + static inline void adjustToLimits( int &b, int &f, uint &amount ) { diff --git a/src/analyzers/blockanalyzer.h b/src/analyzers/blockanalyzer.h index 56ab459d5..7f4e06205 100644 --- a/src/analyzers/blockanalyzer.h +++ b/src/analyzers/blockanalyzer.h @@ -6,8 +6,7 @@ #define BLOCKANALYZER_H #include "analyzerbase.h" -#include -#include +#include class QResizeEvent; class QMouseEvent; @@ -35,6 +34,7 @@ public: static const char* kName; protected: + virtual void transform( Scope& ); virtual void analyze( QPainter& p, const Scope& ); virtual void resizeEvent( QResizeEvent* ); virtual void paletteChange( const QPalette& ); @@ -60,8 +60,6 @@ private: std::vector m_fade_intensity; float m_step; //rows to fall per frame - - QTime time_; }; #endif diff --git a/src/analyzers/boomanalyzer.cpp b/src/analyzers/boomanalyzer.cpp index e04656489..77dfec185 100644 --- a/src/analyzers/boomanalyzer.cpp +++ b/src/analyzers/boomanalyzer.cpp @@ -8,7 +8,7 @@ const char* BoomAnalyzer::kName = QT_TRANSLATE_NOOP("AnalyzerContainer", "Boom analyzer"); BoomAnalyzer::BoomAnalyzer( QWidget *parent ) - : Analyzer::Base(parent) + : Analyzer::Base( parent, 9 ) , K_barHeight( 1.271 )//1.471 , F_peakSpeed( 1.103 )//1.122 , F( 1.0 ) @@ -58,6 +58,26 @@ BoomAnalyzer::init() } } +void +BoomAnalyzer::transform( Scope &s ) +{ + float *front = static_cast( &s.front() ); + + m_fht->spectrum( front ); + m_fht->scale( front, 1.0 / 60 ); + + Scope scope( 32, 0 ); + + const uint xscale[] = { 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,19,24,29,36,43,52,63,76,91,108,129,153,182,216,255 }; + + for( uint j, i = 0; i < 32; i++ ) + for( j = xscale[i]; j < xscale[i + 1]; j++ ) + if ( s[j] > scope[i] ) + scope[i] = s[j]; + + s = scope; +} + void BoomAnalyzer::analyze( QPainter& p, const Scope& scope ) { diff --git a/src/analyzers/boomanalyzer.h b/src/analyzers/boomanalyzer.h index d35d1d2c9..5709d1283 100644 --- a/src/analyzers/boomanalyzer.h +++ b/src/analyzers/boomanalyzer.h @@ -20,6 +20,7 @@ public: static const char* kName; virtual void init(); + virtual void transform( Scope &s ); virtual void analyze( QPainter& p, const Scope& ); public slots: diff --git a/src/analyzers/glbaranalyzer.cpp b/src/analyzers/glbaranalyzer.cpp deleted file mode 100644 index 05af3fb45..000000000 --- a/src/analyzers/glbaranalyzer.cpp +++ /dev/null @@ -1,123 +0,0 @@ -#include "glbaranalyzer.h" - -#include - -#include -#include -#include - -const char* GLBarAnalyzer::kName = "GL Bar Analyzer"; - -GLBarAnalyzer::GLBarAnalyzer(QWidget* parent) - : AnalyzerBase(parent), - rectangles_size_(0), - shader_(this) { -} - -void GLBarAnalyzer::SpectrumAvailable(const QVector& spectrum) { - current_spectrum_ = spectrum; - updateGL(); -} - -void GLBarAnalyzer::initializeGL() { - - QColor background_color = QApplication::palette().color(QPalette::Window); - qglClearColor(background_color); - - glDisable(GL_DEPTH_TEST); - - shader_.addShaderFromSourceFile(QGLShader::Vertex, ":shaders/glblock_vert.glsl"); - shader_.addShaderFromSourceFile(QGLShader::Fragment, ":shaders/glblock_frag.glsl"); - shader_.link(); - if (!shader_.isLinked()) { - qWarning() << "Shader failed to link" - << shader_.log(); - } -} - -void GLBarAnalyzer::resizeGL(int w, int h) { - glViewport(0, 0, w, h); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); -} - -void GLBarAnalyzer::paintGL() { - if (current_spectrum_.size() != rectangles_size_) { - rectangles_.reset(new float[current_spectrum_.size() * 3 * 4]); - rectangles_size_ = current_spectrum_.size(); - std::fill(rectangles_.get(), rectangles_.get() + rectangles_size_ * 3 * 4, 0.0f); - - tex_coords_.reset(new float[rectangles_size_ * 2 * 4]); - for (int i = 0; i < rectangles_size_ * 2 * 4; i += 2 * 4) { - tex_coords_[i] = 0.0; - tex_coords_[i+1] = 0.0; - - tex_coords_[i+2] = 1.0; - tex_coords_[i+3] = 0.0; - - tex_coords_[i+4] = 1.0; - tex_coords_[i+5] = 1.0; - - tex_coords_[i+6] = 0.0; - tex_coords_[i+7] = 1.0; - } - } - - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - glLoadIdentity(); - - const float width = 2.0 / current_spectrum_.size(); - - // Now we have x 0.0 -> 1.0 and y 0.0 -> 1.0. - glTranslatef(-1.0, -1.0, 0.0); - glScalef(2.0, 2.0, 1.0); - - - for (int i = 0; i < current_spectrum_.size(); ++i) { - const float x = width * i; - const float height = current_spectrum_[i] + 0.2; - - float* current_rectangle = rectangles_.get() + i*4*3; // 4 points of size 3. - float* bottom_left = current_rectangle; - float* bottom_right = current_rectangle + 3; - float* top_right = current_rectangle + 6; - float* top_left = current_rectangle + 9; - - bottom_left[0] = x; - bottom_left[1] = 0.0; - - bottom_right[0] = x + width; - bottom_right[1] = 0.0; - - top_right[0] = x + width; - top_right[1] = height; - - top_left[0] = x; - top_left[1] = height; - } - - shader_.bind(); - - glEnableClientState(GL_VERTEX_ARRAY); - glEnableClientState(GL_TEXTURE_COORD_ARRAY); - - // Draw rectangles. - glVertexPointer(3, GL_FLOAT, 0, rectangles_.get()); - glTexCoordPointer(2, GL_FLOAT, 0, tex_coords_.get()); - - glColor3f(1.0, 0.0, 0.0); - glPolygonMode(GL_FRONT, GL_FILL); - glDrawArrays(GL_QUADS, 0, rectangles_size_ * 4); - - // Draw outlines. - glColor3f(1.0, 1.0, 1.0); - glPolygonMode(GL_FRONT, GL_LINE); - glDrawArrays(GL_QUADS, 0, rectangles_size_ * 4); - - glDisableClientState(GL_TEXTURE_COORD_ARRAY); - glDisableClientState(GL_VERTEX_ARRAY); -} diff --git a/src/analyzers/glbaranalyzer.h b/src/analyzers/glbaranalyzer.h deleted file mode 100644 index ef91648a9..000000000 --- a/src/analyzers/glbaranalyzer.h +++ /dev/null @@ -1,36 +0,0 @@ -#ifndef GLBARANALYZER_H -#define GLBARANALYZER_H - -#include "analyzer.h" - -#include - -#include - -class GLBarAnalyzer : public AnalyzerBase { - Q_OBJECT - public: - Q_INVOKABLE GLBarAnalyzer(QWidget* parent = 0); - - static const char* kName; - - protected: - void initializeGL(); - void resizeGL(int w, int h); - void paintGL(); - - protected slots: - // AnalyzerBase - void SpectrumAvailable(const QVector& spectrum); - - private: - QVector current_spectrum_; - - boost::scoped_array rectangles_; - boost::scoped_array tex_coords_; - size_t rectangles_size_; - - QGLShaderProgram shader_; -}; - -#endif diff --git a/src/analyzers/glblockanalyzer.cpp b/src/analyzers/glblockanalyzer.cpp deleted file mode 100644 index c94b14826..000000000 --- a/src/analyzers/glblockanalyzer.cpp +++ /dev/null @@ -1,155 +0,0 @@ -#include "glblockanalyzer.h" - -#include -#include - -#include - -#include -#include -#include - -const char* GLBlockAnalyzer::kName = "GL Block Analyzer"; - -GLBlockAnalyzer::GLBlockAnalyzer(QWidget* parent) - : AnalyzerBase(parent), - current_spectrum_(200, 0.0), - rectangles_size_(0), - shader_(this) { -} - -void GLBlockAnalyzer::SpectrumAvailable(const QVector& spectrum) { - current_spectrum_ = spectrum; - updateGL(); -} - -void GLBlockAnalyzer::initializeGL() { - - QColor background_color = QApplication::palette().color(QPalette::Window); - qglClearColor(background_color); - - glDisable(GL_DEPTH_TEST); - - shader_.addShaderFromSourceFile(QGLShader::Vertex, ":shaders/glblock_vert.glsl"); - shader_.addShaderFromSourceFile(QGLShader::Fragment, ":shaders/glblock_frag.glsl"); - shader_.link(); - if (!shader_.isLinked()) { - qWarning() << "Shader failed to link" - << shader_.log(); - } -} - -void GLBlockAnalyzer::resizeGL(int w, int h) { - glViewport(0, 0, w, h); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - - num_columns_ = w / kRectPixels; - - rectangles_size_ = num_columns_ * kNumRectangles * 4 * 3; - rectangles_.reset(new float[rectangles_size_]); - const float rect_height = 1.0 / kNumRectangles; - const float rect_width = 1.0 / num_columns_; - const int row_size = 3 * 4 * num_columns_; - for (int y = 0; y < kNumRectangles; ++y) { - for (int x = 0; x < num_columns_; ++x) { - float* pos = &rectangles_[y * row_size + x * 3 * 4]; - float* bottom_left = pos; - float* bottom_right = pos + 3; - float* top_right = pos + 6; - float* top_left = pos + 9; - - bottom_left[0] = x * rect_width; - bottom_left[1] = y * rect_height; - bottom_left[2] = 0.0; - - bottom_right[0] = (x + 1) * rect_width; - bottom_right[1] = y * rect_height; - bottom_right[2] = 0.0; - - top_right[0] = (x + 1) * rect_width; - top_right[1] = (y + 1) * rect_height; - top_right[2] = 0.0; - - top_left[0] = x * rect_width; - top_left[1] = (y + 1) * rect_height; - top_left[2] = 0.0; - } - } -} - -namespace { -class ColourGenerator { - public: - ColourGenerator(const QColor& colour) - : i_(0) { - rgb_[0] = colour.redF(); - rgb_[1] = colour.greenF(); - rgb_[2] = colour.blueF(); - } - float operator() () { - return rgb_[i_++ % 3]; - } - private: - int i_; - float rgb_[3]; -}; -} // namespace - -void GLBlockAnalyzer::paintGL() { - colours_.reset(new float[rectangles_size_]); - std::fill(colours_.get(), colours_.get() + rectangles_size_, 0.8); - - QColor bg_colour = QApplication::palette().color(QPalette::Window); - std::generate(colours_.get(), colours_.get() + rectangles_size_, - ColourGenerator(bg_colour.darker(120))); - - const int row_size = 3 * 4 * num_columns_; - for (int x = 0; x < num_columns_; ++x) { - int peak_rect = current_spectrum_[x] * 10; - float* peak = &colours_[peak_rect * row_size + x * 3 * 4]; - const QColor& colour = Qt::blue; - std::generate(peak, peak + 3 * 4, ColourGenerator(colour)); - for (int i = 0; i < peak_rect; ++i) { - float* p = &colours_[i * row_size + x * 3 * 4]; - const QColor& c = colour.lighter(std::pow(double(i - peak_rect), 2) * 10 + 100); - if (c.valueF() > bg_colour.valueF()) { - std::generate(p, p + 3 * 4, ColourGenerator(bg_colour)); - } else { - std::generate(p, p + 3 * 4, ColourGenerator(c)); - } - } - } - - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - glLoadIdentity(); - - // Now we have x 0.0 -> 1.0 and y 0.0 -> 1.0. - glTranslatef(-1.0, -1.0, 0.0); - glScalef(2.0, 2.0, 1.0); - - //shader_.bind(); - - glEnableClientState(GL_VERTEX_ARRAY); - glEnableClientState(GL_COLOR_ARRAY); - - // Draw rectangles. - glVertexPointer(3, GL_FLOAT, 0, rectangles_.get()); - glColorPointer(3, GL_FLOAT, 0, colours_.get()); - - glColor3f(1.0, 0.0, 0.0); - glPolygonMode(GL_FRONT, GL_FILL); - glDrawArrays(GL_QUADS, 0, rectangles_size_ / 3); - - glDisableClientState(GL_COLOR_ARRAY); - // Draw outlines. - qglColor(bg_colour); - glPolygonMode(GL_FRONT, GL_LINE); - glDrawArrays(GL_QUADS, 0, rectangles_size_ / 3); - - glDisableClientState(GL_VERTEX_ARRAY); -} diff --git a/src/analyzers/glblockanalyzer.h b/src/analyzers/glblockanalyzer.h deleted file mode 100644 index 181e952e3..000000000 --- a/src/analyzers/glblockanalyzer.h +++ /dev/null @@ -1,41 +0,0 @@ -#ifndef GLBLOCKANALYZER_H -#define GLBLOCKANALYZER_H - -#include "analyzer.h" - -#include - -#include - -class GLBlockAnalyzer : public AnalyzerBase { - Q_OBJECT - public: - Q_INVOKABLE GLBlockAnalyzer(QWidget* parent = 0); - - static const char* kName; - - protected: - void initializeGL(); - void resizeGL(int w, int h); - void paintGL(); - - protected slots: - // AnalyzerBase - void SpectrumAvailable(const QVector& spectrum); - - private: - QVector current_spectrum_; - - boost::scoped_array rectangles_; - boost::scoped_array colours_; - size_t rectangles_size_; - - static const int kNumRectangles = 10; - static const int kRectPixels = 5; - - int num_columns_; - - QGLShaderProgram shader_; -}; - -#endif diff --git a/src/analyzers/sonogram.cpp b/src/analyzers/sonogram.cpp index e56d16feb..91ef44ce9 100644 --- a/src/analyzers/sonogram.cpp +++ b/src/analyzers/sonogram.cpp @@ -18,7 +18,7 @@ const char* Sonogram::kName = QT_TRANSLATE_NOOP("AnalyzerContainer", "Sonogram"); Sonogram::Sonogram(QWidget *parent) : - Analyzer::Base(parent) + Analyzer::Base(parent, 9) { } @@ -32,6 +32,11 @@ void Sonogram::resizeEvent(QResizeEvent *e) { QWidget::resizeEvent(e); +//only for gcc < 4.0 +#if !( __GNUC__ > 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ >= 0 ) ) + resizeForBands(height() < 128 ? 128 : height()); +#endif + canvas_ = QPixmap(size()); canvas_.fill(palette().color(QPalette::Background)); } @@ -68,8 +73,18 @@ void Sonogram::analyze(QPainter& p, const Scope &s) p.drawPixmap(0, 0, canvas_); } -void Sonogram::demo(QPainter& p) + +void Sonogram::transform(Scope &scope) { - analyze(p, Scope(m_lastScope.size(), 0)); + float *front = static_cast(&scope.front()); + m_fht->power2(front); + m_fht->scale(front, 1.0 / 256); + scope.resize( m_fht->size() / 2 ); +} + + +void Sonogram::demo(QPainter& p) +{ + analyze(p, Scope(m_fht->size(), 0)); } diff --git a/src/analyzers/sonogram.h b/src/analyzers/sonogram.h index 24876e514..8a4b08aca 100644 --- a/src/analyzers/sonogram.h +++ b/src/analyzers/sonogram.h @@ -31,6 +31,7 @@ public: protected: void analyze(QPainter& p, const Scope&); + void transform(Scope&); void demo(QPainter& p); void resizeEvent(QResizeEvent*); diff --git a/src/core/fht.cpp b/src/core/fht.cpp new file mode 100644 index 000000000..36d276edf --- /dev/null +++ b/src/core/fht.cpp @@ -0,0 +1,242 @@ +// FHT - Fast Hartley Transform Class +// +// Copyright (C) 2004 Melchior FRANZ - mfranz@kde.org +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License as +// published by the Free Software Foundation; either version 2 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, 51 Franklin Steet, Fifth Floor, Boston, MA 02110-1301, USA +// +// $Id$ + +#include +#include +#include "fht.h" + + +FHT::FHT(int n) : + m_buf(0), + m_tab(0), + m_log(0) +{ + if (n < 3) { + m_num = 0; + m_exp2 = -1; + return; + } + m_exp2 = n; + m_num = 1 << n; + if (n > 3) { + m_buf = new float[m_num]; + m_tab = new float[m_num * 2]; + makeCasTable(); + } +} + + +FHT::~FHT() +{ + delete[] m_buf; + delete[] m_tab; + delete[] m_log; +} + + +void FHT::makeCasTable(void) +{ + float d, *costab, *sintab; + int ul, ndiv2 = m_num / 2; + + for (costab = m_tab, sintab = m_tab + m_num / 2 + 1, ul = 0; ul < m_num; ul++) { + d = M_PI * ul / ndiv2; + *costab = *sintab = cos(d); + + costab += 2, sintab += 2; + if (sintab > m_tab + m_num * 2) + sintab = m_tab + 1; + } +} + + +float* FHT::copy(float *d, float *s) +{ + return (float *)memcpy(d, s, m_num * sizeof(float)); +} + + +float* FHT::clear(float *d) +{ + return (float *)memset(d, 0, m_num * sizeof(float)); +} + + +void FHT::scale(float *p, float d) +{ + for (int i = 0; i < (m_num / 2); i++) + *p++ *= d; +} + + +void FHT::ewma(float *d, float *s, float w) +{ + for (int i = 0; i < (m_num / 2); i++, d++, s++) + *d = *d * w + *s * (1 - w); +} + + +void FHT::logSpectrum(float *out, float *p) +{ + int n = m_num / 2, i, j, k, *r; + if (!m_log) { + m_log = new int[n]; + float f = n / log10((double)n); + for (i = 0, r = m_log; i < n; i++, r++) { + j = int(rint(log10(i + 1.0) * f)); + *r = j >= n ? n - 1 : j; + } + } + semiLogSpectrum(p); + *out++ = *p = *p / 100; + for (k = i = 1, r = m_log; i < n; i++) { + j = *r++; + if (i == j) + *out++ = p[i]; + else { + float base = p[k - 1]; + float step = (p[j] - base) / (j - (k - 1)); + for (float corr = 0; k <= j; k++, corr += step) + *out++ = base + corr; + } + } +} + + +void FHT::semiLogSpectrum(float *p) +{ + float e; + power2(p); + for (int i = 0; i < (m_num / 2); i++, p++) { + e = 10.0 * log10(sqrt(*p * .5)); + *p = e < 0 ? 0 : e; + } +} + + +void FHT::spectrum(float *p) +{ + power2(p); + for (int i = 0; i < (m_num / 2); i++, p++) + *p = (float)sqrt(*p * .5); +} + + +void FHT::power(float *p) +{ + power2(p); + for (int i = 0; i < (m_num / 2); i++) + *p++ *= .5; +} + + +void FHT::power2(float *p) +{ + int i; + float *q; + _transform(p, m_num, 0); + + *p = (*p * *p), *p += *p, p++; + + for (i = 1, q = p + m_num - 2; i < (m_num / 2); i++, --q) + *p = (*p * *p) + (*q * *q), p++; +} + + +void FHT::transform(float *p) +{ + if (m_num == 8) + transform8(p); + else + _transform(p, m_num, 0); +} + + +void FHT::transform8(float *p) +{ + float a, b, c, d, e, f, g, h, b_f2, d_h2; + float a_c_eg, a_ce_g, ac_e_g, aceg, b_df_h, bdfh; + + a = *p++, b = *p++, c = *p++, d = *p++; + e = *p++, f = *p++, g = *p++, h = *p; + b_f2 = (b - f) * M_SQRT2; + d_h2 = (d - h) * M_SQRT2; + + a_c_eg = a - c - e + g; + a_ce_g = a - c + e - g; + ac_e_g = a + c - e - g; + aceg = a + c + e + g; + + b_df_h = b - d + f - h; + bdfh = b + d + f + h; + + *p = a_c_eg - d_h2; + *--p = a_ce_g - b_df_h; + *--p = ac_e_g - b_f2; + *--p = aceg - bdfh; + *--p = a_c_eg + d_h2; + *--p = a_ce_g + b_df_h; + *--p = ac_e_g + b_f2; + *--p = aceg + bdfh; +} + + +void FHT::_transform(float *p, int n, int k) +{ + if (n == 8) { + transform8(p + k); + return; + } + + int i, j, ndiv2 = n / 2; + float a, *t1, *t2, *t3, *t4, *ptab, *pp; + + for (i = 0, t1 = m_buf, t2 = m_buf + ndiv2, pp = &p[k]; i < ndiv2; i++) + *t1++ = *pp++, *t2++ = *pp++; + + memcpy(p + k, m_buf, sizeof(float) * n); + + _transform(p, ndiv2, k); + _transform(p, ndiv2, k + ndiv2); + + j = m_num / ndiv2 - 1; + t1 = m_buf; + t2 = t1 + ndiv2; + t3 = p + k + ndiv2; + ptab = m_tab; + pp = p + k; + + a = *ptab++ * *t3++; + a += *ptab * *pp; + ptab += j; + + *t1++ = *pp + a; + *t2++ = *pp++ - a; + + for (i = 1, t4 = p + k + n; i < ndiv2; i++, ptab += j) { + a = *ptab++ * *t3++; + a += *ptab * *--t4; + + *t1++ = *pp + a; + *t2++ = *pp++ - a; + } + memcpy(p + k, m_buf, sizeof(float) * n); +} + diff --git a/src/core/fht.h b/src/core/fht.h new file mode 100644 index 000000000..059fb4299 --- /dev/null +++ b/src/core/fht.h @@ -0,0 +1,119 @@ +// FHT - Fast Hartley Transform Class +// +// Copyright (C) 2004 Melchior FRANZ - mfranz@kde.org +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License as +// published by the Free Software Foundation; either version 2 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, 51 Franklin Steet, Fifth Floor, Boston, MA 02110-1301, USA +// +// $Id$ + +#ifndef FHT_H +#define FHT_H + +/** + * Implementation of the Hartley Transform after Bracewell's discrete + * algorithm. The algorithm is subject to US patent No. 4,646,256 (1987) + * but was put into public domain by the Board of Trustees of Stanford + * University in 1994 and is now freely available[1]. + * + * [1] Computer in Physics, Vol. 9, No. 4, Jul/Aug 1995 pp 373-379 + */ +class FHT +{ + int m_exp2; + int m_num; + float *m_buf; + float *m_tab; + int *m_log; + + /** + * Create a table of "cas" (cosine and sine) values. + * Has only to be done in the constructor and saves from + * calculating the same values over and over while transforming. + */ + void makeCasTable(); + + /** + * Recursive in-place Hartley transform. For internal use only! + */ + void _transform(float *, int, int); + + public: + /** + * Prepare transform for data sets with @f$2^n@f$ numbers, whereby @f$n@f$ + * should be at least 3. Values of more than 3 need a trigonometry table. + * @see makeCasTable() + */ + FHT(int); + + ~FHT(); + inline int sizeExp() const { return m_exp2; } + inline int size() const { return m_num; } + float *copy(float *, float *); + float *clear(float *); + void scale(float *, float); + + /** + * Exponentially Weighted Moving Average (EWMA) filter. + * @param d is the filtered data. + * @param s is fresh input. + * @param w is the weighting factor. + */ + void ewma(float *d, float *s, float w); + + /** + * Logarithmic audio spectrum. Maps semi-logarithmic spectrum + * to logarithmic frequency scale, interpolates missing values. + * A logarithmic index map is calculated at the first run only. + * @param p is the input array. + * @param out is the spectrum. + */ + void logSpectrum(float *out, float *p); + + /** + * Semi-logarithmic audio spectrum. + */ + void semiLogSpectrum(float *); + + /** + * Fourier spectrum. + */ + void spectrum(float *); + + /** + * Calculates a mathematically correct FFT power spectrum. + * If further scaling is applied later, use power2 instead + * and factor the 0.5 in the final scaling factor. + * @see FHT::power2() + */ + void power(float *); + + /** + * Calculates an FFT power spectrum with doubled values as a + * result. The values need to be multiplied by 0.5 to be exact. + * Note that you only get @f$2^{n-1}@f$ power values for a data set + * of @f$2^n@f$ input values. This is the fastest transform. + * @see FHT::power() + */ + void power2(float *); + + /** + * Discrete Hartley transform of data sets with 8 values. + */ + void transform8(float *); + + void transform(float *); +}; + +#endif diff --git a/src/engines/enginebase.h b/src/engines/enginebase.h index f6f3c8d50..a4a2d8f2a 100644 --- a/src/engines/enginebase.h +++ b/src/engines/enginebase.h @@ -71,8 +71,6 @@ class Base : public QObject, boost::noncopyable { bool is_crossfade_enabled() const { return crossfade_enabled_; } bool is_autocrossfade_enabled() const { return autocrossfade_enabled_; } - virtual void SetSpectrum(bool) {} - static const char* kSettingsGroup; static const int kScopeSize = 1024; @@ -96,8 +94,6 @@ class Base : public QObject, boost::noncopyable { void StateChanged(Engine::State); - void SpectrumAvailable(const QVector& spectrum); - protected: Base(); diff --git a/src/engines/gstengine.cpp b/src/engines/gstengine.cpp index 5e0d2a1d2..5cf025edc 100644 --- a/src/engines/gstengine.cpp +++ b/src/engines/gstengine.cpp @@ -75,8 +75,7 @@ GstEngine::GstEngine() rg_compression_(true), seek_timer_(new QTimer(this)), timer_id_(-1), - next_element_id_(0), - spectrum_enabled_(false) + next_element_id_(0) { seek_timer_->setSingleShot(true); seek_timer_->setInterval(kSeekDelay); @@ -472,9 +471,6 @@ bool GstEngine::Load(const QUrl& url, Engine::TrackChangeType change) { current_pipeline_ = pipeline; preload_pipeline_.reset(); - connect(current_pipeline_.get(), SIGNAL(SpectrumAvailable(const QVector&)), - this, SIGNAL(SpectrumAvailable(const QVector&))); - SetVolume(volume_); SetEqualizerEnabled(equalizer_enabled_); SetEqualizerParameters(equalizer_preamp_, equalizer_gains_); @@ -542,8 +538,6 @@ void GstEngine::PlayDone() { Seek(watcher->data()); } - SetSpectrum(spectrum_enabled_); - emit StateChanged(Engine::Playing); } @@ -868,10 +862,3 @@ int GstEngine::AllGloryToTheHypnotoad() { pipeline->SetVolume(5); // Hypnotoad is *loud*. return AddBackgroundStream(pipeline); } - -void GstEngine::SetSpectrum(bool enable) { - spectrum_enabled_ = enable; - if (current_pipeline_) { - current_pipeline_->SetSpectrum(enable); - } -} diff --git a/src/engines/gstengine.h b/src/engines/gstengine.h index ea404f697..a9d524b17 100644 --- a/src/engines/gstengine.h +++ b/src/engines/gstengine.h @@ -104,8 +104,6 @@ class GstEngine : public Engine::Base, public BufferConsumer { void AddBufferConsumer(BufferConsumer* consumer); void RemoveBufferConsumer(BufferConsumer* consumer); - void SetSpectrum(bool enable); - protected: void SetVolumeSW(uint percent); void timerEvent(QTimerEvent*); @@ -190,8 +188,6 @@ class GstEngine : public Engine::Base, public BufferConsumer { int next_element_id_; QHash > background_streams_; - - bool spectrum_enabled_; }; diff --git a/src/engines/gstenginepipeline.cpp b/src/engines/gstenginepipeline.cpp index 1c362940e..0a7305b5d 100644 --- a/src/engines/gstenginepipeline.cpp +++ b/src/engines/gstenginepipeline.cpp @@ -30,10 +30,6 @@ const int GstEnginePipeline::kEqBandCount = 10; const int GstEnginePipeline::kEqBandFrequencies[] = { 60, 170, 310, 600, 1000, 3000, 6000, 12000, 14000, 16000}; -const quint32 GstEnginePipeline::kSpectrumBands = 200; -const int GstEnginePipeline::kSpectrumThreshold = -100; -const quint64 GstEnginePipeline::kSpectrumIntervalns = 16666666; - GstEnginePipeline::GstEnginePipeline(GstEngine* engine) : QObject(NULL), engine_(engine), @@ -60,8 +56,7 @@ GstEnginePipeline::GstEnginePipeline(GstEngine* engine) equalizer_(NULL), volume_(NULL), audioscale_(NULL), - audiosink_(NULL), - spectrum_(NULL) + audiosink_(NULL) { for (int i=0 ; iCreateElement("spectrum", audiobin_))) { return false; } - g_object_set(G_OBJECT(spectrum_), - "bands", kSpectrumBands, - "threshold", kSpectrumThreshold, - NULL); - SetSpectrum(false); // Spectrum disabled by default. - GstPad* pad = gst_element_get_pad(audioconvert_, "sink"); gst_element_add_pad(audiobin_, gst_ghost_pad_new("sink", pad)); gst_object_unref(pad); @@ -215,7 +203,7 @@ bool GstEnginePipeline::Init() { if (!convert) { return false; } if (rg_enabled_) gst_element_link_many(audioconvert_, rgvolume_, rglimiter_, audioconvert2_, NULL); - gst_element_link_many(equalizer_preamp_, equalizer_, spectrum_, volume_, audioscale_, convert, audiosink_, NULL); + gst_element_link_many(equalizer_preamp_, equalizer_, volume_, audioscale_, convert, audiosink_, NULL); gst_bus_set_sync_handler(gst_pipeline_get_bus(GST_PIPELINE(pipeline_)), BusCallbackSync, this); bus_cb_id_ = gst_bus_add_watch(gst_pipeline_get_bus(GST_PIPELINE(pipeline_)), BusCallback, this); @@ -293,10 +281,7 @@ GstBusSyncReply GstEnginePipeline::BusCallbackSync(GstBus*, GstMessage* msg, gpo break; case GST_MESSAGE_ELEMENT: - if (instance->ElementMessageReceived(msg)) { - gst_message_unref(msg); - return GST_BUS_DROP; - } + instance->ElementMessageReceived(msg); break; default: @@ -305,44 +290,17 @@ GstBusSyncReply GstEnginePipeline::BusCallbackSync(GstBus*, GstMessage* msg, gpo return GST_BUS_PASS; } -// Returns whether or not to drop the message. -bool GstEnginePipeline::ElementMessageReceived(GstMessage* msg) { +void GstEnginePipeline::ElementMessageReceived(GstMessage* msg) { const GstStructure* structure = gst_message_get_structure(msg); - const gchar* name = gst_structure_get_name(structure); - if (strcmp(name, "redirect") == 0) { + if (gst_structure_has_name(structure, "redirect")) { const char* uri = gst_structure_get_string(structure, "new-location"); // Set the redirect URL. In mmssrc redirect messages come during the // initial state change to PLAYING, so callers can pick up this URL after // the state change has failed. redirect_url_ = QUrl::fromEncoded(uri); - } else if (strcmp(name, "spectrum") == 0) { - GstPad* pad = gst_element_get_static_pad(spectrum_, "sink"); - GstCaps* caps = gst_pad_get_negotiated_caps(pad); - GstStructure* s = gst_caps_get_structure(caps, 0); - gint frequency = 0; - gboolean ret = gst_structure_get_int(s, "rate", &frequency); - gst_caps_unref(caps); - gst_object_unref(pad); - - if (!ret || frequency == 0) { - qWarning() << "Failed to get rate"; - return true; - } - - const GValue* magnitudes = gst_structure_get_value(structure, "magnitude"); - - QVector spectrum(kSpectrumBands); - for (int i = 0; i < kSpectrumBands; ++i) { - //double f = ((frequency / 2) * i + frequency / 4) / kSpectrumBands; - float mag = g_value_get_float(gst_value_list_get_value(magnitudes, i)); - spectrum[i] = (mag - kSpectrumThreshold) / -kSpectrumThreshold; - } - emit SpectrumAvailable(spectrum); - return true; } - return false; } void GstEnginePipeline::ErrorMessageReceived(GstMessage* msg) { @@ -606,9 +564,3 @@ void GstEnginePipeline::RemoveAllBufferConsumers() { QMutexLocker l(&buffer_consumers_mutex_); buffer_consumers_.clear(); } - -void GstEnginePipeline::SetSpectrum(bool enable) { - g_object_set(spectrum_, - "interval", enable ? kSpectrumIntervalns : std::numeric_limits::max(), - NULL); -} diff --git a/src/engines/gstenginepipeline.h b/src/engines/gstenginepipeline.h index c4afce1f5..7ba394740 100644 --- a/src/engines/gstenginepipeline.h +++ b/src/engines/gstenginepipeline.h @@ -78,8 +78,6 @@ class GstEnginePipeline : public QObject { QUrl redirect_url() const { return redirect_url_; } - void SetSpectrum(bool enable); - public slots: void SetVolumeModifier(qreal mod); @@ -88,7 +86,6 @@ class GstEnginePipeline : public QObject { void MetadataFound(const Engine::SimpleMetaBundle& bundle); void Error(const QString& message); void FaderFinished(); - void SpectrumAvailable(const QVector& spectrum); protected: void timerEvent(QTimerEvent *); @@ -105,7 +102,7 @@ class GstEnginePipeline : public QObject { static bool StopUriDecodeBin(gpointer bin); void TagMessageReceived(GstMessage*); void ErrorMessageReceived(GstMessage*); - bool ElementMessageReceived(GstMessage*); + void ElementMessageReceived(GstMessage*); QString ParseTag(GstTagList* list, const char* tag) const; bool Init(); @@ -125,10 +122,6 @@ class GstEnginePipeline : public QObject { static const int kEqBandCount; static const int kEqBandFrequencies[]; - static const quint32 kSpectrumBands; - static const int kSpectrumThreshold; - static const quint64 kSpectrumIntervalns; - GstEngine* engine_; // General settings for the pipeline @@ -177,7 +170,7 @@ class GstEnginePipeline : public QObject { // Elements in the audiobin // audioconvert ! rgvolume ! rglimiter ! audioconvert ! equalizer_preamp ! - // equalizer ! spectrum ! volume ! audioresample ! audioconvert ! audiosink + // equalizer ! volume ! audioresample ! audioconvert ! audiosink GstElement* audioconvert_; GstElement* rgvolume_; GstElement* rglimiter_; @@ -187,7 +180,6 @@ class GstEnginePipeline : public QObject { GstElement* volume_; GstElement* audioscale_; GstElement* audiosink_; - GstElement* spectrum_; uint bus_cb_id_; }; diff --git a/src/main.cpp b/src/main.cpp index 37d3db311..78d7c1bb7 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -123,7 +123,6 @@ int main(int argc, char *argv[]) { qRegisterMetaTypeStreamOperators("Equalizer::Params"); qRegisterMetaType("const char*"); qRegisterMetaType("QNetworkReply*"); - qRegisterMetaType >("QVector"); #ifdef HAVE_GSTREAMER qRegisterMetaType("GstBuffer*"); @@ -160,9 +159,7 @@ int main(int argc, char *argv[]) { QtSingleApplication a(argc, argv); #ifdef Q_OS_DARWIN - QStringList list; - list << QCoreApplication::applicationDirPath() + "/../PlugIns"; - QCoreApplication::setLibraryPaths(list); + QCoreApplication::addLibraryPath(QCoreApplication::applicationDirPath() + "/../PlugIns"); #endif a.setQuitOnLastWindowClosed(false); diff --git a/src/translations/ar.po b/src/translations/ar.po index 9b9a1249d..c9a3ea16e 100644 --- a/src/translations/ar.po +++ b/src/translations/ar.po @@ -11,10 +11,10 @@ msgstr "" "PO-Revision-Date: 2010-05-21 01:02+0000\n" "Last-Translator: EL7R \n" "Language-Team: Arabic \n" +"Language: ar\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: ar\n" "X-Launchpad-Export-Date: 2010-05-22 04:09+0000\n" "X-Generator: Launchpad (build Unknown)\n" @@ -44,15 +44,15 @@ msgstr "" msgid "%1 tracks" msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "%n failed" msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "%n finished" msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "%n remaining" msgstr "" @@ -633,7 +633,7 @@ msgstr "" msgid "Edit..." msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "Editing %n tracks" msgstr "" @@ -1849,7 +1849,7 @@ msgstr "" msgid "[click to edit]" msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "add %n songs" msgstr "أضِف %n أغاني\\أغنية" @@ -1869,7 +1869,7 @@ msgstr "انقل الأغاني" msgid "options" msgstr "الخيارات" -#, c-format +#, c-format, qt-plural-format msgid "remove %n songs" msgstr "أزِل %n أغاني\\أغنية" diff --git a/src/translations/bg.po b/src/translations/bg.po index 85ff8449d..b31872515 100644 --- a/src/translations/bg.po +++ b/src/translations/bg.po @@ -11,10 +11,10 @@ msgstr "" "PO-Revision-Date: 2010-07-24 15:58+0000\n" "Last-Translator: David Sansome \n" "Language-Team: Bulgarian \n" +"Language: bg\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: bg\n" "X-Launchpad-Export-Date: 2010-07-25 04:25+0000\n" "X-Generator: Launchpad (build Unknown)\n" @@ -44,15 +44,15 @@ msgstr "" msgid "%1 tracks" msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "%n failed" msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "%n finished" msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "%n remaining" msgstr "" @@ -633,7 +633,7 @@ msgstr "" msgid "Edit..." msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "Editing %n tracks" msgstr "" @@ -1849,7 +1849,7 @@ msgstr "" msgid "[click to edit]" msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "add %n songs" msgstr "" @@ -1869,7 +1869,7 @@ msgstr "" msgid "options" msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "remove %n songs" msgstr "" diff --git a/src/translations/ca.po b/src/translations/ca.po index 8408488e9..61bb2001f 100644 --- a/src/translations/ca.po +++ b/src/translations/ca.po @@ -11,10 +11,10 @@ msgstr "" "PO-Revision-Date: 2010-08-05 16:05+0000\n" "Last-Translator: txusko \n" "Language-Team: Catalan \n" +"Language: ca\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: ca\n" "X-Launchpad-Export-Date: 2010-08-06 03:55+0000\n" "X-Generator: Launchpad (build Unknown)\n" @@ -44,15 +44,15 @@ msgstr "%1 seleccionades de" msgid "%1 tracks" msgstr "%1 temes" -#, c-format +#, c-format, qt-plural-format msgid "%n failed" msgstr "%n han fallat" -#, c-format +#, c-format, qt-plural-format msgid "%n finished" msgstr "%n han acabat" -#, c-format +#, c-format, qt-plural-format msgid "%n remaining" msgstr "%n restants" @@ -89,8 +89,8 @@ msgid "" "

If you surround sections of text that contain a token with curly-braces, " "that section will be hidden if the token is empty.

" msgstr "" -"

Les fitxes de reemplaçament comencen amb %, per exemple: %artist %album %" -"title

\n" +"

Les fitxes de reemplaçament comencen amb %, per exemple: %artist %album " +"%title

\n" "\n" "

Si demarques entre claus una secció de text que contingui una fitxa de " "remplaçament, aquesta secció no es mostrarà si la fitxa de remplaçament es " @@ -645,7 +645,7 @@ msgstr "Editar la informació de la pista..." msgid "Edit..." msgstr "Editar..." -#, c-format +#, c-format, qt-plural-format msgid "Editing %n tracks" msgstr "Editant %n pistes" @@ -1870,7 +1870,7 @@ msgstr "Zero" msgid "[click to edit]" msgstr "[clickar per editar]" -#, c-format +#, c-format, qt-plural-format msgid "add %n songs" msgstr "afegeix %n cançons" @@ -1890,7 +1890,7 @@ msgstr "moure cançons" msgid "options" msgstr "opcions" -#, c-format +#, c-format, qt-plural-format msgid "remove %n songs" msgstr "elimina %n cançons" diff --git a/src/translations/cs.po b/src/translations/cs.po index 588860ba2..f2da5e180 100644 --- a/src/translations/cs.po +++ b/src/translations/cs.po @@ -11,10 +11,10 @@ msgstr "" "PO-Revision-Date: 2010-08-10 00:34+0000\n" "Last-Translator: David Sansome \n" "Language-Team: LANGUAGE \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: \n" "X-Launchpad-Export-Date: 2010-08-11 04:06+0000\n" "X-Generator: Launchpad (build Unknown)\n" "X-Language: cs_CZ\n" @@ -45,15 +45,15 @@ msgstr "" msgid "%1 tracks" msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "%n failed" msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "%n finished" msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "%n remaining" msgstr "" @@ -634,7 +634,7 @@ msgstr "Upravit informaci o skladbách..." msgid "Edit..." msgstr "Upravit..." -#, c-format +#, c-format, qt-plural-format msgid "Editing %n tracks" msgstr "Úprava %n stop" @@ -1853,7 +1853,7 @@ msgstr "Vynulovat" msgid "[click to edit]" msgstr "[pro úpravy klikněte]" -#, c-format +#, c-format, qt-plural-format msgid "add %n songs" msgstr "Přidej %n skladby" @@ -1873,7 +1873,7 @@ msgstr "Přesuň skladby" msgid "options" msgstr "Možnosti" -#, c-format +#, c-format, qt-plural-format msgid "remove %n songs" msgstr "Odeber %n skladeb" diff --git a/src/translations/da.po b/src/translations/da.po index cc8ede5fd..ed456ca39 100644 --- a/src/translations/da.po +++ b/src/translations/da.po @@ -12,10 +12,10 @@ msgstr "" "PO-Revision-Date: 2010-07-24 15:57+0000\n" "Last-Translator: Kabel \n" "Language-Team: Danish \n" +"Language: da\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: da\n" "X-Launchpad-Export-Date: 2010-07-25 04:25+0000\n" "X-Generator: Launchpad (build Unknown)\n" @@ -45,15 +45,15 @@ msgstr "" msgid "%1 tracks" msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "%n failed" msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "%n finished" msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "%n remaining" msgstr "" @@ -634,7 +634,7 @@ msgstr "Redigér sporinformation..." msgid "Edit..." msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "Editing %n tracks" msgstr "Redigerer %n spor" @@ -1856,7 +1856,7 @@ msgstr "Nul" msgid "[click to edit]" msgstr "[Klik for at redigere]" -#, c-format +#, c-format, qt-plural-format msgid "add %n songs" msgstr "tilføj %n sange" @@ -1876,7 +1876,7 @@ msgstr "flyt sange" msgid "options" msgstr "indstillinger" -#, c-format +#, c-format, qt-plural-format msgid "remove %n songs" msgstr "fjern %n sange" diff --git a/src/translations/de.po b/src/translations/de.po index 58bf87029..d7702a965 100644 --- a/src/translations/de.po +++ b/src/translations/de.po @@ -12,10 +12,10 @@ msgstr "" "PO-Revision-Date: 2010-08-09 23:36+0000\n" "Last-Translator: Markus Fuchs \n" "Language-Team: German \n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "X-Launchpad-Export-Date: 2010-08-11 04:06+0000\n" "X-Generator: Launchpad (build Unknown)\n" @@ -45,15 +45,15 @@ msgstr "%1 ausgewählt von" msgid "%1 tracks" msgstr "%1 Stücke" -#, c-format +#, c-format, qt-plural-format msgid "%n failed" msgstr "%n fehlgeschlagen" -#, c-format +#, c-format, qt-plural-format msgid "%n finished" msgstr "%n konvertiert" -#, c-format +#, c-format, qt-plural-format msgid "%n remaining" msgstr "%n verbleibend" @@ -644,7 +644,7 @@ msgstr "Metadaten bearbeiten..." msgid "Edit..." msgstr "Bearbeiten..." -#, c-format +#, c-format, qt-plural-format msgid "Editing %n tracks" msgstr "%n Stücke bearbeiten" @@ -1884,7 +1884,7 @@ msgstr "Null" msgid "[click to edit]" msgstr "[zum Bearbeiten klicken]" -#, c-format +#, c-format, qt-plural-format msgid "add %n songs" msgstr "%n Stücke hinzufügen" @@ -1904,7 +1904,7 @@ msgstr "Stücke verschieben" msgid "options" msgstr "Einstellungen" -#, c-format +#, c-format, qt-plural-format msgid "remove %n songs" msgstr "%n Stücke entfernen" diff --git a/src/translations/el.po b/src/translations/el.po index 8b700ea35..e5ffe0982 100644 --- a/src/translations/el.po +++ b/src/translations/el.po @@ -11,10 +11,10 @@ msgstr "" "PO-Revision-Date: 2010-08-09 22:33+0000\n" "Last-Translator: firewalker \n" "Language-Team: \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: \n" "X-Launchpad-Export-Date: 2010-08-11 04:06+0000\n" "X-Generator: Launchpad (build Unknown)\n" "X-Language: el_GR\n" @@ -46,15 +46,15 @@ msgstr "%1 επιλεγμένα από" msgid "%1 tracks" msgstr "%1 κομμάτια" -#, c-format +#, c-format, qt-plural-format msgid "%n failed" msgstr "%n απέτυχε" -#, c-format +#, c-format, qt-plural-format msgid "%n finished" msgstr "%n ολοκληρώθηκε" -#, c-format +#, c-format, qt-plural-format msgid "%n remaining" msgstr "%n απομένει" @@ -646,7 +646,7 @@ msgstr "Τροποποίηση πληροφοριών κομματιού..." msgid "Edit..." msgstr "Επεξεργασία..." -#, c-format +#, c-format, qt-plural-format msgid "Editing %n tracks" msgstr "Τροποποίηση %n κομματιών" @@ -1889,7 +1889,7 @@ msgstr "Zero" msgid "[click to edit]" msgstr "[κλικ για τροποποίηση]" -#, c-format +#, c-format, qt-plural-format msgid "add %n songs" msgstr "προσθήκη %n τραγουδιών" @@ -1909,7 +1909,7 @@ msgstr "μετακίνηση τραγουδιών" msgid "options" msgstr "επιλογές" -#, c-format +#, c-format, qt-plural-format msgid "remove %n songs" msgstr "αφαίρεση %n τραγουδιών" diff --git a/src/translations/en_CA.po b/src/translations/en_CA.po index 78296f64d..5b4442243 100644 --- a/src/translations/en_CA.po +++ b/src/translations/en_CA.po @@ -11,10 +11,10 @@ msgstr "" "PO-Revision-Date: 2010-06-17 01:37+0000\n" "Last-Translator: David Sansome \n" "Language-Team: English (Canada) \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: \n" "X-Launchpad-Export-Date: 2010-06-18 03:42+0000\n" "X-Generator: Launchpad (build Unknown)\n" @@ -44,15 +44,15 @@ msgstr "" msgid "%1 tracks" msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "%n failed" msgstr "%n failed" -#, c-format +#, c-format, qt-plural-format msgid "%n finished" msgstr "%n finished" -#, c-format +#, c-format, qt-plural-format msgid "%n remaining" msgstr "%n remaining" @@ -635,7 +635,7 @@ msgstr "Edit track information..." msgid "Edit..." msgstr "Edit..." -#, c-format +#, c-format, qt-plural-format msgid "Editing %n tracks" msgstr "Editing %n tracks" @@ -1854,7 +1854,7 @@ msgstr "Zero" msgid "[click to edit]" msgstr "[click to edit]" -#, c-format +#, c-format, qt-plural-format msgid "add %n songs" msgstr "add %n songs" @@ -1874,7 +1874,7 @@ msgstr "move songs" msgid "options" msgstr "options" -#, c-format +#, c-format, qt-plural-format msgid "remove %n songs" msgstr "remove %n songs" diff --git a/src/translations/en_GB.po b/src/translations/en_GB.po index fa6fba2cc..ca6f013ab 100644 --- a/src/translations/en_GB.po +++ b/src/translations/en_GB.po @@ -11,10 +11,10 @@ msgstr "" "PO-Revision-Date: 2010-06-17 01:38+0000\n" "Last-Translator: David Sansome \n" "Language-Team: LANGUAGE \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: \n" "X-Launchpad-Export-Date: 2010-06-18 03:42+0000\n" "X-Generator: Launchpad (build Unknown)\n" @@ -44,15 +44,15 @@ msgstr "" msgid "%1 tracks" msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "%n failed" msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "%n finished" msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "%n remaining" msgstr "" @@ -633,7 +633,7 @@ msgstr "Edit track information..." msgid "Edit..." msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "Editing %n tracks" msgstr "Editing %n tracks" @@ -1851,7 +1851,7 @@ msgstr "Zero" msgid "[click to edit]" msgstr "[click to edit]" -#, c-format +#, c-format, qt-plural-format msgid "add %n songs" msgstr "" @@ -1871,7 +1871,7 @@ msgstr "" msgid "options" msgstr "options" -#, c-format +#, c-format, qt-plural-format msgid "remove %n songs" msgstr "" diff --git a/src/translations/es.po b/src/translations/es.po index 0146b3f40..bea740044 100644 --- a/src/translations/es.po +++ b/src/translations/es.po @@ -11,10 +11,10 @@ msgstr "" "PO-Revision-Date: 2010-08-06 16:08+0000\n" "Last-Translator: Eduardo Durany Fernández \n" "Language-Team: LANGUAGE \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: \n" "X-Launchpad-Export-Date: 2010-08-07 03:57+0000\n" "X-Generator: Launchpad (build Unknown)\n" "X-Language: es_ES\n" @@ -45,15 +45,15 @@ msgstr "%1 seleccionadas de" msgid "%1 tracks" msgstr "%1 pistas" -#, c-format +#, c-format, qt-plural-format msgid "%n failed" msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "%n finished" msgstr "%n completado(s)" -#, c-format +#, c-format, qt-plural-format msgid "%n remaining" msgstr "%n pendiente(s)" @@ -646,7 +646,7 @@ msgstr "Editar información de la pista..." msgid "Edit..." msgstr "Editar..." -#, c-format +#, c-format, qt-plural-format msgid "Editing %n tracks" msgstr "Editando %n pistas" @@ -1888,7 +1888,7 @@ msgstr "Zero" msgid "[click to edit]" msgstr "[click para editar]" -#, c-format +#, c-format, qt-plural-format msgid "add %n songs" msgstr "agregar %n pistas" @@ -1908,7 +1908,7 @@ msgstr "mover pistas" msgid "options" msgstr "opciones" -#, c-format +#, c-format, qt-plural-format msgid "remove %n songs" msgstr "remover %n pistas" diff --git a/src/translations/fi.po b/src/translations/fi.po index 2a0644ef6..2baeb3d8c 100644 --- a/src/translations/fi.po +++ b/src/translations/fi.po @@ -11,10 +11,10 @@ msgstr "" "PO-Revision-Date: 2010-08-07 10:10+0000\n" "Last-Translator: Jiri Grönroos \n" "Language-Team: Finnish \n" +"Language: fi\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: fi\n" "X-Launchpad-Export-Date: 2010-08-08 04:02+0000\n" "X-Generator: Launchpad (build Unknown)\n" @@ -44,15 +44,15 @@ msgstr "" msgid "%1 tracks" msgstr "%1 kappaletta" -#, c-format +#, c-format, qt-plural-format msgid "%n failed" msgstr "%n epäonnistui" -#, c-format +#, c-format, qt-plural-format msgid "%n finished" msgstr "%n valmistui" -#, c-format +#, c-format, qt-plural-format msgid "%n remaining" msgstr "%n jäljellä" @@ -633,7 +633,7 @@ msgstr "Muokkaa kappaleen tietoja..." msgid "Edit..." msgstr "Muokkaa..." -#, c-format +#, c-format, qt-plural-format msgid "Editing %n tracks" msgstr "" @@ -1851,7 +1851,7 @@ msgstr "" msgid "[click to edit]" msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "add %n songs" msgstr "" @@ -1871,7 +1871,7 @@ msgstr "" msgid "options" msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "remove %n songs" msgstr "" diff --git a/src/translations/fr.po b/src/translations/fr.po index 1e94f55a6..91c16c5f4 100644 --- a/src/translations/fr.po +++ b/src/translations/fr.po @@ -11,10 +11,10 @@ msgstr "" "PO-Revision-Date: 2010-08-10 17:45+0000\n" "Last-Translator: Robin Wyss \n" "Language-Team: LANGUAGE \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: \n" "X-Launchpad-Export-Date: 2010-08-11 04:06+0000\n" "X-Generator: Launchpad (build Unknown)\n" "X-Language: fr_FR\n" @@ -45,15 +45,15 @@ msgstr "%1 sélectionné de" msgid "%1 tracks" msgstr "%1 pistes" -#, c-format +#, c-format, qt-plural-format msgid "%n failed" msgstr "%n échoué" -#, c-format +#, c-format, qt-plural-format msgid "%n finished" msgstr "%n terminé" -#, c-format +#, c-format, qt-plural-format msgid "%n remaining" msgstr "%n manquant" @@ -638,7 +638,7 @@ msgstr "Modifier la description de la piste..." msgid "Edit..." msgstr "Éditer..." -#, c-format +#, c-format, qt-plural-format msgid "Editing %n tracks" msgstr "Éditer %n pistes" @@ -1867,7 +1867,7 @@ msgstr "Zéro" msgid "[click to edit]" msgstr "[cliquer pour modifier]" -#, c-format +#, c-format, qt-plural-format msgid "add %n songs" msgstr "" @@ -1887,7 +1887,7 @@ msgstr "déplacer les chansons" msgid "options" msgstr "options" -#, c-format +#, c-format, qt-plural-format msgid "remove %n songs" msgstr "" diff --git a/src/translations/gl.po b/src/translations/gl.po index 4512525be..0e3fe49d3 100644 --- a/src/translations/gl.po +++ b/src/translations/gl.po @@ -11,10 +11,10 @@ msgstr "" "PO-Revision-Date: 2010-04-27 16:34+0000\n" "Last-Translator: andreout \n" "Language-Team: Galician \n" +"Language: gl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: gl\n" "X-Launchpad-Export-Date: 2010-04-28 03:53+0000\n" "X-Generator: Launchpad (build Unknown)\n" @@ -44,15 +44,15 @@ msgstr "" msgid "%1 tracks" msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "%n failed" msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "%n finished" msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "%n remaining" msgstr "" @@ -633,7 +633,7 @@ msgstr "" msgid "Edit..." msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "Editing %n tracks" msgstr "Editando %n faixas" @@ -1851,7 +1851,7 @@ msgstr "" msgid "[click to edit]" msgstr "[clique para editar]" -#, c-format +#, c-format, qt-plural-format msgid "add %n songs" msgstr "" @@ -1871,7 +1871,7 @@ msgstr "" msgid "options" msgstr "Opzóns" -#, c-format +#, c-format, qt-plural-format msgid "remove %n songs" msgstr "" diff --git a/src/translations/hu.po b/src/translations/hu.po index 4e4196304..a308ad6f9 100644 --- a/src/translations/hu.po +++ b/src/translations/hu.po @@ -11,10 +11,10 @@ msgstr "" "PO-Revision-Date: 2010-08-11 00:04+0000\n" "Last-Translator: ntomka \n" "Language-Team: Hungarian \n" +"Language: hu\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: hu\n" "X-Launchpad-Export-Date: 2010-08-11 04:06+0000\n" "X-Generator: Launchpad (build Unknown)\n" @@ -44,15 +44,15 @@ msgstr "%1 kiválasztva" msgid "%1 tracks" msgstr "%1 szám" -#, c-format +#, c-format, qt-plural-format msgid "%n failed" msgstr "%n meghiúsult" -#, c-format +#, c-format, qt-plural-format msgid "%n finished" msgstr "%n befejezve" -#, c-format +#, c-format, qt-plural-format msgid "%n remaining" msgstr "%n hátralévő" @@ -642,7 +642,7 @@ msgstr "Száminformáció szerkesztése..." msgid "Edit..." msgstr "Szerkesztés..." -#, c-format +#, c-format, qt-plural-format msgid "Editing %n tracks" msgstr "%n szám szerkesztése" @@ -1878,7 +1878,7 @@ msgstr "Nulla" msgid "[click to edit]" msgstr "[kattintson a szerkesztéshez]" -#, c-format +#, c-format, qt-plural-format msgid "add %n songs" msgstr "%n szám felvétele" @@ -1898,7 +1898,7 @@ msgstr "számok mozgatása" msgid "options" msgstr "beállítások" -#, c-format +#, c-format, qt-plural-format msgid "remove %n songs" msgstr "%n szám eltávolítása" diff --git a/src/translations/it.po b/src/translations/it.po index 3efd94e9c..7b2ec742b 100644 --- a/src/translations/it.po +++ b/src/translations/it.po @@ -12,10 +12,10 @@ msgstr "" "PO-Revision-Date: 2010-08-10 05:09+0000\n" "Last-Translator: Vincenzo Reale \n" "Language-Team: Italian \n" +"Language: it\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: it\n" "X-Launchpad-Export-Date: 2010-08-11 04:07+0000\n" "X-Generator: Launchpad (build Unknown)\n" @@ -45,15 +45,15 @@ msgstr "%1 selezionate di" msgid "%1 tracks" msgstr "%1 tracce" -#, c-format +#, c-format, qt-plural-format msgid "%n failed" msgstr "%n non riusciti" -#, c-format +#, c-format, qt-plural-format msgid "%n finished" msgstr "%n completati" -#, c-format +#, c-format, qt-plural-format msgid "%n remaining" msgstr "%n rimanenti" @@ -649,7 +649,7 @@ msgstr "Modifica informazioni traccia..." msgid "Edit..." msgstr "Modifica..." -#, c-format +#, c-format, qt-plural-format msgid "Editing %n tracks" msgstr "Modifica di %n tracce" @@ -1897,7 +1897,7 @@ msgstr "Zero" msgid "[click to edit]" msgstr "[clic per modificare]" -#, c-format +#, c-format, qt-plural-format msgid "add %n songs" msgstr "aggiungi %n brani" @@ -1917,7 +1917,7 @@ msgstr "sposta brani" msgid "options" msgstr "opzioni" -#, c-format +#, c-format, qt-plural-format msgid "remove %n songs" msgstr "rimuovi %n brani" diff --git a/src/translations/kk.po b/src/translations/kk.po index 9f2847a2c..1f25e8b3f 100644 --- a/src/translations/kk.po +++ b/src/translations/kk.po @@ -11,10 +11,10 @@ msgstr "" "PO-Revision-Date: 2010-04-27 16:33+0000\n" "Last-Translator: David Sansome \n" "Language-Team: Kazakh \n" +"Language: kk\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: kk\n" "X-Launchpad-Export-Date: 2010-04-28 03:53+0000\n" "X-Generator: Launchpad (build Unknown)\n" @@ -44,15 +44,15 @@ msgstr "" msgid "%1 tracks" msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "%n failed" msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "%n finished" msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "%n remaining" msgstr "" @@ -633,7 +633,7 @@ msgstr "" msgid "Edit..." msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "Editing %n tracks" msgstr "" @@ -1851,7 +1851,7 @@ msgstr "Нөл" msgid "[click to edit]" msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "add %n songs" msgstr "" @@ -1871,7 +1871,7 @@ msgstr "" msgid "options" msgstr "опциялар" -#, c-format +#, c-format, qt-plural-format msgid "remove %n songs" msgstr "" diff --git a/src/translations/lt.po b/src/translations/lt.po index 3e06e8e6d..02ff3d1cf 100644 --- a/src/translations/lt.po +++ b/src/translations/lt.po @@ -11,10 +11,10 @@ msgstr "" "PO-Revision-Date: 2010-07-24 16:03+0000\n" "Last-Translator: David Sansome \n" "Language-Team: Lithuanian \n" +"Language: lt\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: lt\n" "X-Launchpad-Export-Date: 2010-07-25 04:26+0000\n" "X-Generator: Launchpad (build Unknown)\n" @@ -44,15 +44,15 @@ msgstr "%1 pažymėta iš" msgid "%1 tracks" msgstr "%1 takeliai" -#, c-format +#, c-format, qt-plural-format msgid "%n failed" msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "%n finished" msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "%n remaining" msgstr "" @@ -633,7 +633,7 @@ msgstr "" msgid "Edit..." msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "Editing %n tracks" msgstr "" @@ -1849,7 +1849,7 @@ msgstr "" msgid "[click to edit]" msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "add %n songs" msgstr "" @@ -1869,7 +1869,7 @@ msgstr "" msgid "options" msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "remove %n songs" msgstr "" diff --git a/src/translations/nb.po b/src/translations/nb.po index a33e26775..13d0fc134 100644 --- a/src/translations/nb.po +++ b/src/translations/nb.po @@ -11,10 +11,10 @@ msgstr "" "PO-Revision-Date: 2010-08-04 18:45+0000\n" "Last-Translator: Simen Heggestøyl \n" "Language-Team: Norwegian Bokmal \n" +"Language: nb\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: nb\n" "X-Launchpad-Export-Date: 2010-08-05 03:44+0000\n" "X-Generator: Launchpad (build Unknown)\n" @@ -44,15 +44,15 @@ msgstr "" msgid "%1 tracks" msgstr "%1 spor" -#, c-format +#, c-format, qt-plural-format msgid "%n failed" msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "%n finished" msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "%n remaining" msgstr "%n gjenstående" @@ -633,7 +633,7 @@ msgstr "Rediger informasjon om sporet..." msgid "Edit..." msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "Editing %n tracks" msgstr "Endrer %n spor" @@ -1853,7 +1853,7 @@ msgstr "Null" msgid "[click to edit]" msgstr "[klikk for å endre]" -#, c-format +#, c-format, qt-plural-format msgid "add %n songs" msgstr "" @@ -1873,7 +1873,7 @@ msgstr "" msgid "options" msgstr "innstillinger" -#, c-format +#, c-format, qt-plural-format msgid "remove %n songs" msgstr "" diff --git a/src/translations/nl.po b/src/translations/nl.po index fd9dc8fd7..7faf1c3a8 100644 --- a/src/translations/nl.po +++ b/src/translations/nl.po @@ -11,10 +11,10 @@ msgstr "" "PO-Revision-Date: 2010-08-08 15:32+0000\n" "Last-Translator: Ward \n" "Language-Team: Dutch \n" +"Language: nl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: nl\n" "X-Launchpad-Export-Date: 2010-08-09 03:57+0000\n" "X-Generator: Launchpad (build Unknown)\n" @@ -44,15 +44,15 @@ msgstr "%1 geselecteerd van" msgid "%1 tracks" msgstr "%1 tracks" -#, c-format +#, c-format, qt-plural-format msgid "%n failed" msgstr "%n mislukt" -#, c-format +#, c-format, qt-plural-format msgid "%n finished" msgstr "%n voltooid" -#, c-format +#, c-format, qt-plural-format msgid "%n remaining" msgstr "%n te gaan" @@ -641,7 +641,7 @@ msgstr "Trackinformatie bewerken..." msgid "Edit..." msgstr "Bewerken..." -#, c-format +#, c-format, qt-plural-format msgid "Editing %n tracks" msgstr "%n tracks bewerken" @@ -1885,7 +1885,7 @@ msgstr "Nul" msgid "[click to edit]" msgstr "[klik om te bewerken:]" -#, c-format +#, c-format, qt-plural-format msgid "add %n songs" msgstr "%n nummers toevoegen" @@ -1905,7 +1905,7 @@ msgstr "nummers verplaatsen" msgid "options" msgstr "opties" -#, c-format +#, c-format, qt-plural-format msgid "remove %n songs" msgstr "%n nummers verwijderen" diff --git a/src/translations/oc.po b/src/translations/oc.po index 63a62c9d5..08493892f 100644 --- a/src/translations/oc.po +++ b/src/translations/oc.po @@ -11,10 +11,10 @@ msgstr "" "PO-Revision-Date: 2010-05-21 01:01+0000\n" "Last-Translator: Cédric VALMARY (Tot en òc) \n" "Language-Team: Occitan (post 1500) \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: \n" "X-Launchpad-Export-Date: 2010-05-22 04:09+0000\n" "X-Generator: Launchpad (build Unknown)\n" @@ -44,15 +44,15 @@ msgstr "" msgid "%1 tracks" msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "%n failed" msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "%n finished" msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "%n remaining" msgstr "" @@ -633,7 +633,7 @@ msgstr "" msgid "Edit..." msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "Editing %n tracks" msgstr "" @@ -1849,7 +1849,7 @@ msgstr "Zèro" msgid "[click to edit]" msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "add %n songs" msgstr "" @@ -1869,7 +1869,7 @@ msgstr "" msgid "options" msgstr "opcions" -#, c-format +#, c-format, qt-plural-format msgid "remove %n songs" msgstr "" diff --git a/src/translations/pl.po b/src/translations/pl.po index 87b3a075d..e5cc65fdb 100644 --- a/src/translations/pl.po +++ b/src/translations/pl.po @@ -11,10 +11,10 @@ msgstr "" "PO-Revision-Date: 2010-07-27 10:29+0000\n" "Last-Translator: Hunab.cu \n" "Language-Team: LANGUAGE \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: \n" "X-Launchpad-Export-Date: 2010-07-28 04:01+0000\n" "X-Generator: Launchpad (build Unknown)\n" "X-Language: pl_PL\n" @@ -45,15 +45,15 @@ msgstr "%1 zaznaczonych z" msgid "%1 tracks" msgstr "%1 ścieżek" -#, c-format +#, c-format, qt-plural-format msgid "%n failed" msgstr "%n zawiodło" -#, c-format +#, c-format, qt-plural-format msgid "%n finished" msgstr "%n zakończone" -#, c-format +#, c-format, qt-plural-format msgid "%n remaining" msgstr "pozostało %n" @@ -639,7 +639,7 @@ msgstr "Edytuj informacje o utworze..." msgid "Edit..." msgstr "Edytuj..." -#, c-format +#, c-format, qt-plural-format msgid "Editing %n tracks" msgstr "Edytowanie %n ścieżek" @@ -1862,7 +1862,7 @@ msgstr "Zero" msgid "[click to edit]" msgstr "[kliknij aby edytować]" -#, c-format +#, c-format, qt-plural-format msgid "add %n songs" msgstr "dodaj %n utworów" @@ -1882,7 +1882,7 @@ msgstr "przenieś utwory" msgid "options" msgstr "opcje" -#, c-format +#, c-format, qt-plural-format msgid "remove %n songs" msgstr "usuń %n utworów" diff --git a/src/translations/pt.po b/src/translations/pt.po index 1ca8c8142..2e5d3247c 100644 --- a/src/translations/pt.po +++ b/src/translations/pt.po @@ -11,10 +11,10 @@ msgstr "" "PO-Revision-Date: 2010-08-10 11:43+0000\n" "Last-Translator: Sérgio Marques \n" "Language-Team: Portuguese \n" +"Language: pt\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: pt\n" "X-Launchpad-Export-Date: 2010-08-11 04:07+0000\n" "X-Generator: Launchpad (build Unknown)\n" @@ -44,15 +44,15 @@ msgstr "seleccionada(s) %1 de" msgid "%1 tracks" msgstr "%1 faixas" -#, c-format +#, c-format, qt-plural-format msgid "%n failed" msgstr "%n falha(s)" -#, c-format +#, c-format, qt-plural-format msgid "%n finished" msgstr "%n concluída(s)" -#, c-format +#, c-format, qt-plural-format msgid "%n remaining" msgstr "%n restante(s)" @@ -643,7 +643,7 @@ msgstr "Editar a informação da faixa..." msgid "Edit..." msgstr "Editar..." -#, c-format +#, c-format, qt-plural-format msgid "Editing %n tracks" msgstr "Editando %n faixas" @@ -1879,7 +1879,7 @@ msgstr "Zero" msgid "[click to edit]" msgstr "[clique para editar]" -#, c-format +#, c-format, qt-plural-format msgid "add %n songs" msgstr "adicionar %n canções" @@ -1899,7 +1899,7 @@ msgstr "mover canções" msgid "options" msgstr "opções" -#, c-format +#, c-format, qt-plural-format msgid "remove %n songs" msgstr "remover %n canções" diff --git a/src/translations/pt_BR.po b/src/translations/pt_BR.po index b8c14906b..89ebd2363 100644 --- a/src/translations/pt_BR.po +++ b/src/translations/pt_BR.po @@ -11,10 +11,10 @@ msgstr "" "PO-Revision-Date: 2010-06-26 18:01+0000\n" "Last-Translator: David Sansome \n" "Language-Team: Brazilian Portuguese \n" +"Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: pt_BR\n" "X-Launchpad-Export-Date: 2010-06-27 03:57+0000\n" "X-Generator: Launchpad (build Unknown)\n" @@ -44,15 +44,15 @@ msgstr "%1 selecionado(s) de" msgid "%1 tracks" msgstr "%1 faixas" -#, c-format +#, c-format, qt-plural-format msgid "%n failed" msgstr "%n falhou" -#, c-format +#, c-format, qt-plural-format msgid "%n finished" msgstr "%n fizalizado" -#, c-format +#, c-format, qt-plural-format msgid "%n remaining" msgstr "%n faltando" @@ -638,7 +638,7 @@ msgstr "Editar informações da faixa..." msgid "Edit..." msgstr "Editar..." -#, c-format +#, c-format, qt-plural-format msgid "Editing %n tracks" msgstr "Editando %n faixas" @@ -1869,7 +1869,7 @@ msgstr "Zero" msgid "[click to edit]" msgstr "[clique para editar]" -#, c-format +#, c-format, qt-plural-format msgid "add %n songs" msgstr "Adicionar %n músicas" @@ -1889,7 +1889,7 @@ msgstr "mover músicas" msgid "options" msgstr "opções" -#, c-format +#, c-format, qt-plural-format msgid "remove %n songs" msgstr "Remover %n músicas" diff --git a/src/translations/ro.po b/src/translations/ro.po index c47083aa2..d9d5cc4ba 100644 --- a/src/translations/ro.po +++ b/src/translations/ro.po @@ -11,10 +11,10 @@ msgstr "" "PO-Revision-Date: 2010-05-03 21:09+0000\n" "Last-Translator: David Sansome \n" "Language-Team: Romanian \n" +"Language: ro\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: ro\n" "X-Launchpad-Export-Date: 2010-05-04 03:52+0000\n" "X-Generator: Launchpad (build Unknown)\n" @@ -44,15 +44,15 @@ msgstr "" msgid "%1 tracks" msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "%n failed" msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "%n finished" msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "%n remaining" msgstr "" @@ -633,7 +633,7 @@ msgstr "" msgid "Edit..." msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "Editing %n tracks" msgstr "" @@ -1850,7 +1850,7 @@ msgstr "Zero" msgid "[click to edit]" msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "add %n songs" msgstr "" @@ -1870,7 +1870,7 @@ msgstr "" msgid "options" msgstr "opțiuni" -#, c-format +#, c-format, qt-plural-format msgid "remove %n songs" msgstr "" diff --git a/src/translations/ru.po b/src/translations/ru.po index c60d7b0f8..1b461d0c0 100644 --- a/src/translations/ru.po +++ b/src/translations/ru.po @@ -10,10 +10,10 @@ msgstr "" "PO-Revision-Date: 2010-08-10 06:34+0000\n" "Last-Translator: Malody \n" "Language-Team: Russian \n" +"Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: ru\n" "X-Launchpad-Export-Date: 2010-08-11 04:07+0000\n" "X-Generator: Launchpad (build Unknown)\n" @@ -43,15 +43,15 @@ msgstr "%1 выбрано из" msgid "%1 tracks" msgstr "%1 композиций" -#, c-format +#, c-format, qt-plural-format msgid "%n failed" msgstr "%n с ошибкой" -#, c-format +#, c-format, qt-plural-format msgid "%n finished" msgstr "%n завершено" -#, c-format +#, c-format, qt-plural-format msgid "%n remaining" msgstr "%n осталось" @@ -640,7 +640,7 @@ msgstr "Изменить информацию о композиции..." msgid "Edit..." msgstr "Изменить..." -#, c-format +#, c-format, qt-plural-format msgid "Editing %n tracks" msgstr "Редактирую %n треков" @@ -1875,7 +1875,7 @@ msgstr "По-умолчанию" msgid "[click to edit]" msgstr "[щелкните, чтобы изменить]" -#, c-format +#, c-format, qt-plural-format msgid "add %n songs" msgstr "добавить %n композиций" @@ -1895,7 +1895,7 @@ msgstr "переместить композиции" msgid "options" msgstr "настройки" -#, c-format +#, c-format, qt-plural-format msgid "remove %n songs" msgstr "удалить %n композиций" diff --git a/src/translations/sk.po b/src/translations/sk.po index 7aaf2ddac..5b5e50279 100644 --- a/src/translations/sk.po +++ b/src/translations/sk.po @@ -11,10 +11,10 @@ msgstr "" "PO-Revision-Date: 2010-08-09 22:11+0000\n" "Last-Translator: DAG Software \n" "Language-Team: \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: \n" "X-Launchpad-Export-Date: 2010-08-11 04:07+0000\n" "X-Generator: Launchpad (build Unknown)\n" "X-Language: sk_SK\n" @@ -45,15 +45,15 @@ msgstr "%1 vybratých z" msgid "%1 tracks" msgstr "%1 skladieb" -#, c-format +#, c-format, qt-plural-format msgid "%n failed" msgstr "%n zlyhalo" -#, c-format +#, c-format, qt-plural-format msgid "%n finished" msgstr "%n dokončených" -#, c-format +#, c-format, qt-plural-format msgid "%n remaining" msgstr "%n zostávajúcich" @@ -642,7 +642,7 @@ msgstr "Upravť informácie o skladbe..." msgid "Edit..." msgstr "Upraviť..." -#, c-format +#, c-format, qt-plural-format msgid "Editing %n tracks" msgstr "Upravovanie %n skladieb" @@ -1876,7 +1876,7 @@ msgstr "Vynulovať" msgid "[click to edit]" msgstr "[kliknite pre úpravu]" -#, c-format +#, c-format, qt-plural-format msgid "add %n songs" msgstr "pridať %n piesní" @@ -1896,7 +1896,7 @@ msgstr "presunúť piesne" msgid "options" msgstr "možnosti" -#, c-format +#, c-format, qt-plural-format msgid "remove %n songs" msgstr "odstrániť %n piesní" diff --git a/src/translations/sl.po b/src/translations/sl.po index 153ec90ef..6fbdaaa81 100644 --- a/src/translations/sl.po +++ b/src/translations/sl.po @@ -11,10 +11,10 @@ msgstr "" "PO-Revision-Date: 2010-08-01 07:33+0000\n" "Last-Translator: R33D3M33R \n" "Language-Team: Slovenian \n" +"Language: sl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: sl\n" "X-Launchpad-Export-Date: 2010-08-02 04:02+0000\n" "X-Generator: Launchpad (build Unknown)\n" @@ -44,15 +44,15 @@ msgstr "izbran %1 od" msgid "%1 tracks" msgstr "%1 skladb" -#, c-format +#, c-format, qt-plural-format msgid "%n failed" msgstr "%n spodletelih" -#, c-format +#, c-format, qt-plural-format msgid "%n finished" msgstr "%n končanih" -#, c-format +#, c-format, qt-plural-format msgid "%n remaining" msgstr "%n preostaja" @@ -641,7 +641,7 @@ msgstr "Uredi informacije o skladbi..." msgid "Edit..." msgstr "Uredi..." -#, c-format +#, c-format, qt-plural-format msgid "Editing %n tracks" msgstr "Urejanje %n skladb" @@ -1876,7 +1876,7 @@ msgstr "Brez" msgid "[click to edit]" msgstr "[kliknite za urejanje]" -#, c-format +#, c-format, qt-plural-format msgid "add %n songs" msgstr "dodaj %n skladb" @@ -1896,7 +1896,7 @@ msgstr "premakni skladbe" msgid "options" msgstr "možnosti" -#, c-format +#, c-format, qt-plural-format msgid "remove %n songs" msgstr "odstrani %n skladb" diff --git a/src/translations/sr.po b/src/translations/sr.po index 283da2ab3..932bdda04 100644 --- a/src/translations/sr.po +++ b/src/translations/sr.po @@ -11,10 +11,10 @@ msgstr "" "PO-Revision-Date: 2010-07-24 16:03+0000\n" "Last-Translator: David Sansome \n" "Language-Team: Serbian \n" +"Language: sr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: sr\n" "X-Launchpad-Export-Date: 2010-07-25 04:26+0000\n" "X-Generator: Launchpad (build Unknown)\n" @@ -44,15 +44,15 @@ msgstr "" msgid "%1 tracks" msgstr "%1 нумера" -#, c-format +#, c-format, qt-plural-format msgid "%n failed" msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "%n finished" msgstr "%n завршено" -#, c-format +#, c-format, qt-plural-format msgid "%n remaining" msgstr "%n преостало" @@ -635,7 +635,7 @@ msgstr "Уреди податке о нумери..." msgid "Edit..." msgstr "Уреди..." -#, c-format +#, c-format, qt-plural-format msgid "Editing %n tracks" msgstr "Уређивање %n нумера" @@ -1856,7 +1856,7 @@ msgstr "Нулто" msgid "[click to edit]" msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "add %n songs" msgstr "додај %n песама" @@ -1876,7 +1876,7 @@ msgstr "" msgid "options" msgstr "Опције" -#, c-format +#, c-format, qt-plural-format msgid "remove %n songs" msgstr "remove %n песама" diff --git a/src/translations/sv.po b/src/translations/sv.po index 55af91be6..68206b19a 100644 --- a/src/translations/sv.po +++ b/src/translations/sv.po @@ -11,10 +11,10 @@ msgstr "" "PO-Revision-Date: 2010-08-10 16:24+0000\n" "Last-Translator: David Bengtsson \n" "Language-Team: Swedish \n" +"Language: sv\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: sv\n" "X-Launchpad-Export-Date: 2010-08-11 04:07+0000\n" "X-Generator: Launchpad (build Unknown)\n" @@ -44,15 +44,15 @@ msgstr "%1 markerade av" msgid "%1 tracks" msgstr "%1 spår" -#, c-format +#, c-format, qt-plural-format msgid "%n failed" msgstr "%n misslyckades" -#, c-format +#, c-format, qt-plural-format msgid "%n finished" msgstr "%n färdig" -#, c-format +#, c-format, qt-plural-format msgid "%n remaining" msgstr "%n återstår" @@ -637,7 +637,7 @@ msgstr "Redigera spårinformation..." msgid "Edit..." msgstr "Redigera..." -#, c-format +#, c-format, qt-plural-format msgid "Editing %n tracks" msgstr "Redigerar %n spår" @@ -1871,7 +1871,7 @@ msgstr "Noll" msgid "[click to edit]" msgstr "[klicka för att redigera]" -#, c-format +#, c-format, qt-plural-format msgid "add %n songs" msgstr "Lägg till %n songer" @@ -1891,7 +1891,7 @@ msgstr "Flytta songer" msgid "options" msgstr "alternativ" -#, c-format +#, c-format, qt-plural-format msgid "remove %n songs" msgstr "Ta bort %n songer" diff --git a/src/translations/tr.po b/src/translations/tr.po index 584c196e4..d1129d695 100644 --- a/src/translations/tr.po +++ b/src/translations/tr.po @@ -11,10 +11,10 @@ msgstr "" "PO-Revision-Date: 2010-07-25 01:29+0000\n" "Last-Translator: ironic \n" "Language-Team: Turkish \n" +"Language: tr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: tr\n" "X-Launchpad-Export-Date: 2010-07-26 04:29+0000\n" "X-Generator: Launchpad (build Unknown)\n" @@ -44,15 +44,15 @@ msgstr "" msgid "%1 tracks" msgstr "%1 parça" -#, c-format +#, c-format, qt-plural-format msgid "%n failed" msgstr "%n başarısız" -#, c-format +#, c-format, qt-plural-format msgid "%n finished" msgstr "%n tamamlandı" -#, c-format +#, c-format, qt-plural-format msgid "%n remaining" msgstr "%n kalan" @@ -633,7 +633,7 @@ msgstr "Parça bilgisini düzenle..." msgid "Edit..." msgstr "Düzenle..." -#, c-format +#, c-format, qt-plural-format msgid "Editing %n tracks" msgstr "" @@ -1855,7 +1855,7 @@ msgstr "" msgid "[click to edit]" msgstr "[düzenlemek için tıklayın]" -#, c-format +#, c-format, qt-plural-format msgid "add %n songs" msgstr "%n şakıyı ekle" @@ -1875,7 +1875,7 @@ msgstr "Parçaları taşı" msgid "options" msgstr "seçenekler" -#, c-format +#, c-format, qt-plural-format msgid "remove %n songs" msgstr "%n şakıyı çıkart" diff --git a/src/translations/translations.pot b/src/translations/translations.pot index 58ab457a4..1869612a6 100644 --- a/src/translations/translations.pot +++ b/src/translations/translations.pot @@ -34,15 +34,15 @@ msgstr "" msgid "%1 tracks" msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "%n failed" msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "%n finished" msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "%n remaining" msgstr "" @@ -623,7 +623,7 @@ msgstr "" msgid "Edit..." msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "Editing %n tracks" msgstr "" @@ -1839,7 +1839,7 @@ msgstr "" msgid "[click to edit]" msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "add %n songs" msgstr "" @@ -1859,7 +1859,7 @@ msgstr "" msgid "options" msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "remove %n songs" msgstr "" diff --git a/src/translations/uk.po b/src/translations/uk.po index d86d9f531..4f42ecec1 100644 --- a/src/translations/uk.po +++ b/src/translations/uk.po @@ -11,10 +11,10 @@ msgstr "" "PO-Revision-Date: 2010-08-03 09:12+0000\n" "Last-Translator: Sergiy Gavrylov \n" "Language-Team: Ukrainian \n" +"Language: uk\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: uk\n" "X-Launchpad-Export-Date: 2010-08-04 04:00+0000\n" "X-Generator: Launchpad (build Unknown)\n" @@ -44,15 +44,15 @@ msgstr "вибрано з %1" msgid "%1 tracks" msgstr "%1 доріжок" -#, c-format +#, c-format, qt-plural-format msgid "%n failed" msgstr "%n з помилкою" -#, c-format +#, c-format, qt-plural-format msgid "%n finished" msgstr "%n завершено" -#, c-format +#, c-format, qt-plural-format msgid "%n remaining" msgstr "%n залишилось" @@ -641,7 +641,7 @@ msgstr "Редагувати дані про доріжку..." msgid "Edit..." msgstr "Змінити..." -#, c-format +#, c-format, qt-plural-format msgid "Editing %n tracks" msgstr "Редагування %n доріжок" @@ -1874,7 +1874,7 @@ msgstr "Zero" msgid "[click to edit]" msgstr "[клацніть, щоб змінити]" -#, c-format +#, c-format, qt-plural-format msgid "add %n songs" msgstr "додати %n композицій" @@ -1894,7 +1894,7 @@ msgstr "перемістити композиції" msgid "options" msgstr "параметри" -#, c-format +#, c-format, qt-plural-format msgid "remove %n songs" msgstr "вилучити %n композицій" diff --git a/src/translations/zh_CN.po b/src/translations/zh_CN.po index f36b7195e..a300f296d 100644 --- a/src/translations/zh_CN.po +++ b/src/translations/zh_CN.po @@ -11,10 +11,10 @@ msgstr "" "PO-Revision-Date: 2010-06-07 01:43+0000\n" "Last-Translator: David Sansome \n" "Language-Team: Chinese (Simplified) \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: \n" "X-Launchpad-Export-Date: 2010-06-08 03:51+0000\n" "X-Generator: Launchpad (build Unknown)\n" @@ -44,15 +44,15 @@ msgstr "" msgid "%1 tracks" msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "%n failed" msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "%n finished" msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "%n remaining" msgstr "" @@ -633,7 +633,7 @@ msgstr "" msgid "Edit..." msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "Editing %n tracks" msgstr "" @@ -1849,7 +1849,7 @@ msgstr "" msgid "[click to edit]" msgstr "" -#, c-format +#, c-format, qt-plural-format msgid "add %n songs" msgstr "" @@ -1869,7 +1869,7 @@ msgstr "" msgid "options" msgstr "选项" -#, c-format +#, c-format, qt-plural-format msgid "remove %n songs" msgstr "" diff --git a/src/translations/zh_TW.po b/src/translations/zh_TW.po index 90cdef929..2fe294e2d 100644 --- a/src/translations/zh_TW.po +++ b/src/translations/zh_TW.po @@ -11,10 +11,10 @@ msgstr "" "PO-Revision-Date: 2010-08-10 00:39+0000\n" "Last-Translator: David Sansome \n" "Language-Team: Chinese (Traditional) \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: \n" "X-Launchpad-Export-Date: 2010-08-11 04:07+0000\n" "X-Generator: Launchpad (build Unknown)\n" @@ -44,15 +44,15 @@ msgstr "%1 選定" msgid "%1 tracks" msgstr "%1 歌曲" -#, c-format +#, c-format, qt-plural-format msgid "%n failed" msgstr "%n 失敗的" -#, c-format +#, c-format, qt-plural-format msgid "%n finished" msgstr "%n 完成的" -#, c-format +#, c-format, qt-plural-format msgid "%n remaining" msgstr "%n 剩餘的" @@ -637,7 +637,7 @@ msgstr "編輯歌曲資訊..." msgid "Edit..." msgstr "編輯..." -#, c-format +#, c-format, qt-plural-format msgid "Editing %n tracks" msgstr "編輯 %n 歌曲" @@ -1856,7 +1856,7 @@ msgstr "" msgid "[click to edit]" msgstr "[點擊以編輯]" -#, c-format +#, c-format, qt-plural-format msgid "add %n songs" msgstr "加入 %n 歌" @@ -1876,7 +1876,7 @@ msgstr "移動歌曲" msgid "options" msgstr "選項" -#, c-format +#, c-format, qt-plural-format msgid "remove %n songs" msgstr "移除 %n 歌"