summaryrefslogtreecommitdiffstats
path: root/kioslave/audiocd/plugins/vorbis
diff options
context:
space:
mode:
Diffstat (limited to 'kioslave/audiocd/plugins/vorbis')
-rw-r--r--kioslave/audiocd/plugins/vorbis/Makefile.am18
-rw-r--r--kioslave/audiocd/plugins/vorbis/audiocd_vorbis_encoder.kcfg84
-rw-r--r--kioslave/audiocd/plugins/vorbis/audiocd_vorbis_encoder.kcfgc4
-rw-r--r--kioslave/audiocd/plugins/vorbis/encodervorbis.cpp336
-rw-r--r--kioslave/audiocd/plugins/vorbis/encodervorbis.h68
-rw-r--r--kioslave/audiocd/plugins/vorbis/encodervorbisconfig.ui425
6 files changed, 935 insertions, 0 deletions
diff --git a/kioslave/audiocd/plugins/vorbis/Makefile.am b/kioslave/audiocd/plugins/vorbis/Makefile.am
new file mode 100644
index 00000000..e83240ff
--- /dev/null
+++ b/kioslave/audiocd/plugins/vorbis/Makefile.am
@@ -0,0 +1,18 @@
+INCLUDES = -I$(top_srcdir)/libkcddb -I$(srcdir)/.. $(all_includes)
+
+kde_kcfg_DATA = audiocd_vorbis_encoder.kcfg
+
+kde_module_LTLIBRARIES = libaudiocd_encoder_vorbis.la
+
+libaudiocd_encoder_vorbis_la_SOURCES = audiocd_vorbis_encoder.kcfgc encodervorbis.cpp encodervorbisconfig.ui
+
+libaudiocd_encoder_vorbis_la_LIBADD = $(VORBIS_LIBS) $(VORBISFILE_LIBS) $(VORBISENC_LIBS) $(LIB_KIO) ../libaudiocdplugins.la
+
+libaudiocd_encoder_vorbis_la_LDFLAGS = -avoid-version -module -no-undefined $(all_libraries)
+
+pluginsdir = $(kde_datadir)/audiocd/plugins
+
+METASOURCES = AUTO
+
+messages: rc.cpp
+ $(XGETTEXT) *.cpp -o $(podir)/audiocd_encoder_vorbis.pot
diff --git a/kioslave/audiocd/plugins/vorbis/audiocd_vorbis_encoder.kcfg b/kioslave/audiocd/plugins/vorbis/audiocd_vorbis_encoder.kcfg
new file mode 100644
index 00000000..53465f6c
--- /dev/null
+++ b/kioslave/audiocd/plugins/vorbis/audiocd_vorbis_encoder.kcfg
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<kcfg xmlns="http://www.kde.org/standards/kcfg/1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0
+ http://www.kde.org/standards/kcfg/1.0/kcfg.xsd" >
+ <kcfgfile name="kcmaudiocd_encoder_vorbis_rc"/>
+ <group name="Vorbis">
+
+ <entry name="vorbis_enc_method" type="Int">
+ <label>Vorbis Encoding Quality or Bitrate</label>
+ <default>0</default>
+ </entry>
+
+ <entry name="set_vorbis_min_br" type="Bool">
+ <label>Minimal bitrate specified</label>
+ <default>false</default>
+ </entry>
+ <entry name="set_vorbis_max_br" type="Bool">
+ <label>Maximal bitrate specified</label>
+ <default>false</default>
+ </entry>
+ <entry name="set_vorbis_nominal_br" type="Bool">
+ <label>Average bitrate specified</label>
+ <default>true</default>
+ </entry>
+
+ <entry name="vorbis_comments" type="Bool">
+ <label>Add Comments</label>
+ <default>true</default>
+ </entry>
+ <entry name="vorbis_quality" type="Double">
+ <label>Quality</label>
+ <default>3</default>
+ <min>-1</min>
+ <max>10</max>
+ </entry>
+
+ <entry name="vorbis_min_br" type="Int">
+ <label>Minimal bitrate</label>
+ <default>1</default>
+ <min>0</min>
+ <max>13</max>
+ </entry>
+
+ <entry name="vorbis_max_br" type="Int">
+ <label>maximal bitrate</label>
+ <default>13</default>
+ <min>0</min>
+ <max>13</max>
+ </entry>
+
+ <entry name="vorbis_nominal_br" type="Int">
+ <label>maximal bitrate</label>
+ <default>3</default>
+ <min>0</min>
+ <max>5</max>
+ </entry>
+
+<!--
+ <entry name="vorbis_nominal_br" type="Enum">
+ <label>maximal bitrate</label>
+ <default>150</default>
+ <choices>
+ <choice name="32"/>
+ <choice name="40"/>
+ <choice name="48"/>
+ <choice name="56"/>
+ <choice name="64"/>
+ <choice name="80"/>
+ <choice name="96"/>
+ <choice name="112"/>
+ <choice name="128"/>
+ <choice name="160"/>
+ <choice name="192"/>
+ <choice name="224"/>
+ <choice name="256"/>
+ <choice name="350"/>
+ </choices>
+ </entry> -->
+
+
+ </group>
+</kcfg>
+
diff --git a/kioslave/audiocd/plugins/vorbis/audiocd_vorbis_encoder.kcfgc b/kioslave/audiocd/plugins/vorbis/audiocd_vorbis_encoder.kcfgc
new file mode 100644
index 00000000..e213ccbd
--- /dev/null
+++ b/kioslave/audiocd/plugins/vorbis/audiocd_vorbis_encoder.kcfgc
@@ -0,0 +1,4 @@
+# Code generation options for kconfig_compiler
+File=audiocd_vorbis_encoder.kcfg
+ClassName=Settings
+Singleton=true
diff --git a/kioslave/audiocd/plugins/vorbis/encodervorbis.cpp b/kioslave/audiocd/plugins/vorbis/encodervorbis.cpp
new file mode 100644
index 00000000..01d8b00b
--- /dev/null
+++ b/kioslave/audiocd/plugins/vorbis/encodervorbis.cpp
@@ -0,0 +1,336 @@
+/*
+ Copyright (C) 2000 Rik Hemsley (rikkus) <[email protected]>
+ Copyright (C) 2000, 2001, 2002 Michael Matz <[email protected]>
+ Copyright (C) 2001 Carsten Duvenhorst <[email protected]>
+ Copyright (C) 2001 Adrian Schroeter <[email protected]>
+ Copyright (C) 2003 Richard Lärkäng <[email protected]>
+ Copyright (C) 2003 Scott Wheeler <[email protected]>
+ Copyright (C) 2004, 2005 Benjamin Meyer <ben at meyerhome dot net>
+
+ 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, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+#include "encodervorbis.h"
+#include "audiocd_vorbis_encoder.h"
+#include "encodervorbisconfig.h"
+
+#ifdef HAVE_VORBIS
+
+#include <vorbis/vorbisenc.h>
+#include <time.h>
+#include <stdlib.h>
+#include <kconfig.h>
+#include <knuminput.h>
+#include <qgroupbox.h>
+
+#include <kglobal.h>
+#include <klocale.h>
+
+extern "C"
+{
+ KDE_EXPORT void create_audiocd_encoders(KIO::SlaveBase *slave, QPtrList<AudioCDEncoder> &encoders)
+ {
+ encoders.append(new EncoderVorbis(slave));
+ }
+}
+
+// these are the approx. bitrates for the current 5 Vorbis modes
+static int vorbis_nominal_bitrates[] = { 128, 160, 192, 256, 350 };
+static int vorbis_bitrates[] = { 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 350 };
+
+class EncoderVorbis::Private {
+
+public:
+ ogg_stream_state os; /* take physical pages, weld into a logical stream of packets */
+ ogg_page og; /* one Ogg bitstream page. Vorbis packets are inside */
+ ogg_packet op; /* one raw packet of data for decode */
+
+ vorbis_info vi; /* struct that stores all the static vorbis bitstream settings */
+ vorbis_comment vc; /* struct that stores all the user comments */
+
+ vorbis_dsp_state vd; /* central working state for the packet->PCM decoder */
+ vorbis_block vb; /* local working space for packet->PCM decode */
+ bool write_vorbis_comments;
+ long vorbis_bitrate_lower;
+ long vorbis_bitrate_upper;
+ long vorbis_bitrate_nominal;
+ int vorbis_encode_method;
+ double vorbis_quality;
+ int vorbis_bitrate;
+};
+
+EncoderVorbis::EncoderVorbis(KIO::SlaveBase *slave) : AudioCDEncoder(slave) {
+ d = new Private();
+}
+
+EncoderVorbis::~EncoderVorbis(){
+ delete d;
+}
+
+QWidget* EncoderVorbis::getConfigureWidget(KConfigSkeleton** manager) const {
+ (*manager) = Settings::self();
+ KGlobal::locale()->insertCatalogue("audiocd_encoder_vorbis");
+ EncoderVorbisConfig *config = new EncoderVorbisConfig();
+ config->kcfg_vorbis_quality->setRange(0.0, 10.0, 0.2, true);
+ config->vorbis_bitrate_settings->hide();
+ return config;
+}
+
+bool EncoderVorbis::init(){
+ vorbis_info_init(&d->vi);
+ vorbis_comment_init(&d->vc);
+
+ vorbis_comment_add_tag
+ (
+ &d->vc,
+ const_cast<char *>("kde-encoder"),
+ const_cast<char *>("kio_audiocd")
+ );
+ return true;
+}
+
+void EncoderVorbis::loadSettings(){
+ Settings *settings = Settings::self();
+
+ d->vorbis_encode_method = settings->vorbis_enc_method();
+ d->vorbis_quality = settings->vorbis_quality();
+
+ if ( settings->set_vorbis_min_br()) {
+ d->vorbis_bitrate_lower = vorbis_bitrates[settings->vorbis_min_br()] * 1000;
+ } else {
+ d->vorbis_bitrate_lower = -1;
+ }
+
+ if ( settings->set_vorbis_max_br() ) {
+ d->vorbis_bitrate_upper = vorbis_bitrates[settings->vorbis_max_br()] * 1000;
+ } else {
+ d->vorbis_bitrate_upper = -1;
+ }
+
+ // this is such a hack!
+ if ( d->vorbis_bitrate_upper != -1 && d->vorbis_bitrate_lower != -1 ) {
+ d->vorbis_bitrate = 104000; // empirically determined ...?!
+ } else {
+ d->vorbis_bitrate = 160 * 1000;
+ }
+
+ if ( settings->set_vorbis_nominal_br() ) {
+ d->vorbis_bitrate_nominal = vorbis_nominal_bitrates[settings->vorbis_nominal_br()] * 1000;
+ d->vorbis_bitrate = d->vorbis_bitrate_nominal;
+ } else {
+ d->vorbis_bitrate_nominal = -1;
+ }
+
+ d->write_vorbis_comments = settings->vorbis_comments();
+
+ // Now that we have read in the settings apply them to the encoder lib
+ switch (d->vorbis_encode_method) {
+ case 0:
+/* Support very old libvorbis by simply falling through. */
+#if HAVE_VORBIS >= 2
+ vorbis_encode_init_vbr(&d->vi, 2, 44100, d->vorbis_quality/10.0);
+ break;
+#endif
+ case 1:
+ vorbis_encode_init(&d->vi, 2, 44100, d->vorbis_bitrate_upper, d->vorbis_bitrate_nominal, d->vorbis_bitrate_lower);
+ break;
+ }
+
+}
+
+long EncoderVorbis::flush_vorbis(void) {
+ long processed(0);
+
+ while(vorbis_analysis_blockout(&d->vd,&d->vb)==1) {
+ /* Support ancient libvorbis (< RC3). */
+#if HAVE_VORBIS >= 2
+ vorbis_analysis(&d->vb,NULL);
+ /* Non-ancient case. */
+ vorbis_bitrate_addblock(&d->vb);
+
+ while(vorbis_bitrate_flushpacket(&d->vd, &d->op)) {
+#else
+ vorbis_analysis(&d->vb,&d->op);
+ /* Make a lexical block to place the #ifdef's nearby. */
+ if (1) {
+#endif
+ ogg_stream_packetin(&d->os,&d->op);
+ while(int result=ogg_stream_pageout(&d->os,&d->og)) {
+ if (!result) break;
+
+ QByteArray output;
+
+ char * oggheader = reinterpret_cast<char *>(d->og.header);
+ char * oggbody = reinterpret_cast<char *>(d->og.body);
+
+ if (d->og.header_len) {
+ output.setRawData(oggheader, d->og.header_len);
+ ioslave->data(output);
+ output.resetRawData(oggheader, d->og.header_len);
+ }
+
+ if (d->og.body_len) {
+ output.setRawData(oggbody, d->og.body_len);
+ ioslave->data(output);
+ output.resetRawData(oggbody, d->og.body_len);
+ }
+ processed += d->og.header_len + d->og.body_len;
+ }
+ }
+ }
+ return processed;
+}
+
+unsigned long EncoderVorbis::size(long time_secs) const {
+ long vorbis_size;
+ switch (d->vorbis_encode_method)
+ {
+ case 0: // quality based encoding
+
+#if HAVE_VORBIS >= 2 // If really old Vorbis is being used, skip this nicely.
+
+ {
+ // Estimated numbers based on the Vorbis FAQ:
+ // http://www.xiph.org/archives/vorbis-faq/200203/0030.html
+
+ static long vorbis_q_bitrate[] = { 60, 74, 86, 106, 120, 152,
+ 183, 207, 239, 309, 440 };
+ long quality = static_cast<long>(d->vorbis_quality);
+ if (quality < 0 || quality > 10)
+ quality = 3;
+ vorbis_size = (time_secs * vorbis_q_bitrate[quality] * 1000) / 8;
+
+ break;
+ }
+
+#endif // HAVE_VORBIS >= 2
+
+ default: // bitrate based encoding
+ vorbis_size = (time_secs * d->vorbis_bitrate/8);
+ break;
+ }
+
+ return vorbis_size;
+}
+
+const char * EncoderVorbis::mimeType() const{
+ return "audio/vorbis";
+}
+
+long EncoderVorbis::readInit(long /*size*/){
+ ogg_packet header;
+ ogg_packet header_comm;
+ ogg_packet header_code;
+
+ vorbis_analysis_init(&d->vd,&d->vi);
+ vorbis_block_init(&d->vd,&d->vb);
+
+ srand(time(NULL));
+ ogg_stream_init(&d->os,rand());
+
+ vorbis_analysis_headerout(&d->vd,&d->vc,&header,&header_comm,&header_code);
+
+ ogg_stream_packetin(&d->os,&header);
+ ogg_stream_packetin(&d->os,&header_comm);
+ ogg_stream_packetin(&d->os,&header_code);
+
+ while (int result = ogg_stream_flush(&d->os,&d->og)) {
+
+ if (!result) break;
+
+ QByteArray output;
+
+ char * oggheader = reinterpret_cast<char *>(d->og.header);
+ char * oggbody = reinterpret_cast<char *>(d->og.body);
+
+ if (d->og.header_len) {
+ output.setRawData(oggheader, d->og.header_len);
+ ioslave->data(output);
+ output.resetRawData(oggheader, d->og.header_len);
+ }
+
+ if (d->og.body_len) {
+ output.setRawData(oggbody, d->og.body_len);
+ ioslave->data(output);
+ output.resetRawData(oggbody, d->og.body_len);
+ }
+ }
+ return 0;
+}
+
+long EncoderVorbis::read(int16_t * buf, int frames){
+ int i;
+ float **buffer=vorbis_analysis_buffer(&d->vd,frames);
+
+ /* uninterleave samples */
+ for(i=0;i<frames;i++){
+ buffer[0][i]=buf[2*i]/32768.0;
+ buffer[1][i]=buf[2*i+1]/32768.0;
+ }
+
+ /* process chunk of data */
+ vorbis_analysis_wrote(&d->vd,i);
+ return flush_vorbis();
+}
+
+long EncoderVorbis::readCleanup(){
+ // send end-of-stream and flush the encoder
+ vorbis_analysis_wrote(&d->vd,0);
+ long processed = flush_vorbis();
+ ogg_stream_clear(&d->os);
+ vorbis_block_clear(&d->vb);
+ vorbis_dsp_clear(&d->vd);
+ vorbis_info_clear(&d->vi);
+ return processed;
+}
+
+void EncoderVorbis::fillSongInfo( KCDDB::CDInfo info, int track, const QString &comment )
+{
+ if( !d->write_vorbis_comments )
+ return;
+
+ typedef QPair<QCString, QVariant> CommentField;
+ QValueList<CommentField> commentFields;
+
+ commentFields.append(CommentField("title", info.trackInfoList[track].get("title")));
+ commentFields.append(CommentField("artist", info.get("artist")));
+ commentFields.append(CommentField("album", info.get("title")));
+ commentFields.append(CommentField("genre", info.get("genre")));
+ commentFields.append(CommentField("tracknumber", QString::number(track+1)));
+ commentFields.append(CommentField("comment", comment));
+
+ if (info.get("year").toInt() > 0) {
+ QDateTime dt(QDate(info.get("year").toInt(), 1, 1));
+ commentFields.append(CommentField("date", dt.toString(Qt::ISODate).utf8().data()));
+ }
+
+ for(QValueListIterator<CommentField> it = commentFields.begin(); it != commentFields.end(); ++it) {
+
+ // if the value is not empty
+ if(!(*it).second.toString().isEmpty()) {
+
+ char *key = qstrdup((*it).first);
+ char *value = qstrdup((*it).second.toString().utf8().data());
+
+ vorbis_comment_add_tag(&d->vc, key, value);
+
+ delete [] key;
+ delete [] value;
+ }
+ }
+}
+
+#endif // HAVE_VORBIS
+
diff --git a/kioslave/audiocd/plugins/vorbis/encodervorbis.h b/kioslave/audiocd/plugins/vorbis/encodervorbis.h
new file mode 100644
index 00000000..28b837ce
--- /dev/null
+++ b/kioslave/audiocd/plugins/vorbis/encodervorbis.h
@@ -0,0 +1,68 @@
+/*
+ Copyright (C) 2000 Rik Hemsley (rikkus) <[email protected]>
+ Copyright (C) 2000, 2001, 2002 Michael Matz <[email protected]>
+ Copyright (C) 2001 Carsten Duvenhorst <[email protected]>
+ Copyright (C) 2001 Adrian Schroeter <[email protected]>
+ Copyright (C) 2003 Richard Lärkäng <[email protected]>
+ Copyright (C) 2003 Scott Wheeler <[email protected]>
+ Copyright (C) 2004, 2005 Benjamin Meyer <ben at meyerhome dot net>
+
+ 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, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+#ifndef ENCODER_VORBIS_H
+#define ENCODER_VORBIS_H
+
+#include <config.h>
+
+#ifdef HAVE_VORBIS
+
+#include <audiocdencoder.h>
+
+/**
+ * Ogg Vorbis encoder.
+ * This encoder is only enabled when HAVE_VORBIS is set.
+ * Check out http://www.vorbis.com/ for lots of information.
+ */
+class EncoderVorbis : public AudioCDEncoder {
+
+public:
+ EncoderVorbis(KIO::SlaveBase *slave);
+ ~EncoderVorbis();
+
+ virtual QString type() const { return "Ogg Vorbis"; };
+ virtual bool init();
+ virtual void loadSettings();
+ virtual unsigned long size(long time_secs) const;
+ virtual const char * fileType() const { return "ogg"; };
+ virtual const char * mimeType() const;
+ virtual void fillSongInfo( KCDDB::CDInfo info, int track, const QString &comment );
+ virtual long readInit(long size);
+ virtual long read(int16_t * buf, int frames);
+ virtual long readCleanup();
+ virtual QWidget* getConfigureWidget(KConfigSkeleton** manager) const;
+
+private:
+ long flush_vorbis();
+
+ class Private;
+ Private * d;
+
+};
+
+#endif // HAVE_VORBIS
+
+#endif // ENCODER_VORBIS_H
+
diff --git a/kioslave/audiocd/plugins/vorbis/encodervorbisconfig.ui b/kioslave/audiocd/plugins/vorbis/encodervorbisconfig.ui
new file mode 100644
index 00000000..17000745
--- /dev/null
+++ b/kioslave/audiocd/plugins/vorbis/encodervorbisconfig.ui
@@ -0,0 +1,425 @@
+<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
+<class>EncoderVorbisConfig</class>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>VorbisConfig</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>375</width>
+ <height>408</height>
+ </rect>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QButtonGroup">
+ <property name="name">
+ <cstring>kcfg_vorbis_enc_method</cstring>
+ </property>
+ <property name="title">
+ <string>&amp;Encoding Method</string>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QRadioButton">
+ <property name="name">
+ <cstring>vorbis_enc_quality</cstring>
+ </property>
+ <property name="text">
+ <string>Quality based</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QRadioButton">
+ <property name="name">
+ <cstring>vorbis_enc_bitrate</cstring>
+ </property>
+ <property name="text">
+ <string>Bitrate based</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QGroupBox">
+ <property name="name">
+ <cstring>vorbis_bitrate_settings</cstring>
+ </property>
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="title">
+ <string>Vorbis Bitrate Settings</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QComboBox" row="0" column="1">
+ <item>
+ <property name="text">
+ <string>32 kbs</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>40 kbs</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>48 kbs</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>56 kbs</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>64 kbs</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>80 kbs</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>96 kbs</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>112 kbs</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>128 kbs</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>160 kbs</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>192 kbs</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>224 kbs</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>256 kbs</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>350 kbs</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>kcfg_vorbis_min_br</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="currentItem">
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="1" column="1">
+ <item>
+ <property name="text">
+ <string>32 kbs</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>40 kbs</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>48 kbs</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>56 kbs</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>64 kbs</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>80 kbs</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>96 kbs</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>112 kbs</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>128 kbs</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>160 kbs</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>192 kbs</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>224 kbs</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>256 kbs</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>350 kbs</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>kcfg_vorbis_max_br</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="currentItem">
+ <number>13</number>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="0" column="0">
+ <property name="name">
+ <cstring>kcfg_set_vorbis_min_br</cstring>
+ </property>
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="text">
+ <string>M&amp;inimal bitrate:</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="1" column="0">
+ <property name="name">
+ <cstring>kcfg_set_vorbis_max_br</cstring>
+ </property>
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="text">
+ <string>Ma&amp;ximal bitrate:</string>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="2" column="1">
+ <item>
+ <property name="text">
+ <string>128 kbs</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>160 kbs</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>192 kbs</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>256 kbs</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>350 kbs</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>kcfg_vorbis_nominal_br</cstring>
+ </property>
+ <property name="currentItem">
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="2" column="0">
+ <property name="name">
+ <cstring>kcfg_set_vorbis_nominal_br</cstring>
+ </property>
+ <property name="text">
+ <string>A&amp;verage bitrate:</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QGroupBox">
+ <property name="name">
+ <cstring>vorbis_quality_settings</cstring>
+ </property>
+ <property name="title">
+ <string>Vorbis &amp;Quality Setting</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>You can set the quality of the encoded stream here. A higher value implies a higher quality but encodes slower.</string>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="KDoubleNumInput">
+ <property name="name">
+ <cstring>kcfg_vorbis_quality</cstring>
+ </property>
+ <property name="value">
+ <number>0</number>
+ </property>
+ <property name="minValue">
+ <number>0</number>
+ </property>
+ <property name="maxValue">
+ <number>10000</number>
+ </property>
+ <property name="precision">
+ <number>1</number>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Higher is better but slower</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QGroupBox">
+ <property name="name">
+ <cstring>GroupBox193</cstring>
+ </property>
+ <property name="title">
+ <string>Options</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>kcfg_vorbis_comments</cstring>
+ </property>
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="text">
+ <string>Add &amp;track information</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Add a description of the song to the file header. This makes it easy for the user to get advanced song information shown by his media player. You can get this information automatically via the Internet. Look at the &lt;i&gt;"CDDB Retrieval"&lt;/i&gt; control module for details.</string>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer9</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>51</height>
+ </size>
+ </property>
+ </spacer>
+ </vbox>
+</widget>
+<connections>
+ <connection>
+ <sender>vorbis_enc_bitrate</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>vorbis_bitrate_settings</receiver>
+ <slot>setShown(bool)</slot>
+ </connection>
+ <connection>
+ <sender>vorbis_enc_quality</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>vorbis_quality_settings</receiver>
+ <slot>setShown(bool)</slot>
+ </connection>
+</connections>
+<tabstops>
+ <tabstop>vorbis_enc_quality</tabstop>
+ <tabstop>kcfg_set_vorbis_min_br</tabstop>
+ <tabstop>kcfg_set_vorbis_max_br</tabstop>
+ <tabstop>kcfg_set_vorbis_nominal_br</tabstop>
+ <tabstop>kcfg_vorbis_min_br</tabstop>
+ <tabstop>kcfg_vorbis_max_br</tabstop>
+ <tabstop>kcfg_vorbis_nominal_br</tabstop>
+ <tabstop>kcfg_vorbis_quality</tabstop>
+ <tabstop>kcfg_vorbis_comments</tabstop>
+</tabstops>
+<layoutdefaults spacing="6" margin="11"/>
+<includehints>
+ <includehint>knuminput.h</includehint>
+ <includehint>knuminput.h</includehint>
+</includehints>
+</UI>