Index: settings.pro
===================================================================
--- settings.pro	(revision 9761)
+++ settings.pro	(working copy)
@@ -2,10 +2,10 @@
 #CONFIG += release
 
 isEmpty( PREFIX ) {
-    PREFIX = /usr/local
+    PREFIX = /usr
 }
 
-LIBVERSION = 0.18
+LIBVERSION = 0.19
 
 INCLUDEPATH += $${PREFIX}/include
 
Index: mfd/plugins/audio/audio.cpp
===================================================================
--- mfd/plugins/audio/audio.cpp	(revision 9761)
+++ mfd/plugins/audio/audio.cpp	(working copy)
@@ -45,7 +45,7 @@
     //  thr RTSP streamer can use to get PCM bits to send out.
     //
 
-    output = AudioOutput::OpenAudio("NULL", 16, 2, 44100, AUDIOOUTPUT_MUSIC, true );
+    output = AudioOutput::OpenAudio("NULL", 16, 2, 44100, AUDIOOUTPUT_MUSIC, true, false );
     output->bufferOutputData(true);
     output->setBufferSize(output_buffer_size * 1024);
     output->SetBlocking(false);
@@ -516,7 +516,7 @@
 #else
             QString adevice = gContext->GetSetting("AudioDevice");
             // TODO: Error checking that device is opened correctly!
-            output = AudioOutput::OpenAudio(adevice, 16, 2, 44100, AUDIOOUTPUT_MUSIC, true );
+            output = AudioOutput::OpenAudio(adevice, 16, 2, 44100, AUDIOOUTPUT_MUSIC, true, false );
             output->setBufferSize(output_buffer_size * 1024);
             output->SetBlocking(false);
             output->addListener(audio_listener);
Index: mfd/plugins/mmusic/mmusic.cpp
===================================================================
--- mfd/plugins/mmusic/mmusic.cpp	(revision 9761)
+++ mfd/plugins/mmusic/mmusic.cpp	(working copy)
@@ -526,7 +526,7 @@
     
     MSqlQuery query(MSqlQuery::InitCon());
     
-    query.exec("SELECT intid, filename FROM musicmetadata ;");
+    query.exec("SELECT song_id, filename FROM music_songs ;");
     
     if(query.isActive())
     {
@@ -544,7 +544,7 @@
 
                     ++count;
                     MSqlQuery delete_query(MSqlQuery::InitCon());
-                    delete_query.prepare("DELETE FROM musicmetadata WHERE intid = ?");
+                    delete_query.prepare("DELETE FROM music_songs WHERE song_id = ?");
                     delete_query.bindValue(0, query.value(0).toUInt());
                     delete_query.exec();
                     log(QString("removed item %1 (\"%2\") from the database")
@@ -556,7 +556,7 @@
     }
     else
     {
-        warning("something wrong with your musicmetadata table");
+        warning("something wrong with your music_songs table");
     }
     
     if(count > 0)
@@ -638,13 +638,13 @@
     
     MSqlQuery query(MSqlQuery::InitCon());
     
-    query.exec("SELECT COUNT(filename) FROM musicmetadata;");
+    query.exec("SELECT COUNT(filename) FROM music_songs;");
     
     if(!query.isActive())
     {
         if(!sent_musicmetadata_table_warning)
         {
-            warning("cannot get data from a table called musicmetadata");
+            warning("cannot get data from a table called music_songs");
             sent_musicmetadata_table_warning = true;
         }
         return false;
@@ -977,14 +977,30 @@
 
     MSqlQuery query(MSqlQuery::InitCon());
 
-    query.prepare("SELECT intid, artist, album, title, genre, "
+/*    query.prepare("SELECT intid, artist, album, title, genre, "
                   "year, tracknum, length, rating, "
                   "lastplay, playcount, mythdigest, size, date_added, "
                   "date_modified, format, description, comment, "
                   "compilation, composer, disc_count, disc_number, "
                   "track_count, start_time, stop_time, eq_preset, "
                   "relative_volume, sample_rate, bpm "
-                  "FROM musicmetadata WHERE filename = ? ;");
+                  "FROM musicmetadata WHERE filename = ? ;");*/
+    query.prepare("SELECT music_songs.song_id, music_artists.artist_name, "
+		  "music_albums.album_name, music_songs.name, "
+		  "music_genres.genre, music_songs.year, "
+		  "music_songs.track, music_songs.length, "
+		  "music_songs.rating, music_songs.lastplay, "
+		  "music_songs.numplays, music_songs.mythdigest,"
+		  "music_songs.size, music_songs.date_entered, "
+		  "music_songs.date_modified, music_songs.format, "
+		  "music_songs.description, music_songs.comment, "
+		  "music_songs.compilation, music_artists_1.artist_name AS composer, "
+		  "music_songs.disc_count, music_songs.disc_number, "
+		  "music_songs.track_count, music_songs.start_time, "
+		  "music_songs.stop_time, music_songs.eq_preset, "
+		  "music_songs.relative_volume, music_songs.bitrate, "
+		  "music_songs.bpm "
+		  "FROM (((music_songs INNER JOIN music_albums ON music_songs.album_id = music_albums.album_id) INNER JOIN music_artists ON music_songs.artist_id = music_artists.artist_id) INNER JOIN music_genres ON music_songs.genre_id = music_genres.genre_id) INNER JOIN music_artists AS music_artists_1 ON music_songs.compilationartist_id = music_artists_1.artist_id WHERE FILENAME = ? ;");
 
     query.bindValue(0, sqlfilename.utf8());
     
@@ -1198,7 +1214,7 @@
         
         MSqlQuery query(MSqlQuery::InitCon());
 
-        query.prepare("INSERT INTO musicmetadata (filename, mythdigest) "
+        query.prepare("INSERT INTO music_songs(filename, mythdigest) "
                       "values ( ? , ?)");
 
         query.bindValue(0, sqlfilename.utf8());
@@ -1213,7 +1229,7 @@
             return NULL;
         }
         
-        query.prepare("SELECT intid FROM musicmetadata "
+        query.prepare("SELECT song_id FROM music_songs "
                                "WHERE mythdigest = ? ;");
         query.bindValue(0, new_item->getMythDigest());
         query.exec();
@@ -1322,26 +1338,26 @@
 
     MSqlQuery query(MSqlQuery::InitCon());
 
-    query.prepare("UPDATE musicmetadata SET "
-                  "title = ? , "
-                  "artist = ? , "
-                  "album = ? , "
-                  "genre = ? , "
+    query.prepare("UPDATE music_songs SET "
+                  "name = ? , "
+                  "artist_id = ? , "
+                  "album_id = ? , "
+                  "genre_id = ? , "
                   "year = ? , "
-                  "tracknum = ? , "
+                  "track = ? , "
                   "length = ? , "
                   "rating = ? , "
                   "lastplay = ? , "
-                  "playcount = ? , "
+                  "numplays = ? , "
                   "mythdigest = ? , "
                   "size = ? , "
-                  "date_added = ? , "
+                  "date_entered = ? , "
                   "date_modified = ? , "
                   "format = ? , "
                   "description = ? , "
                   "comment = ? , "
                   "compilation = ? , "
-                  "composer = ? , "
+                  "compilationartist_id = ? , "
                   "disc_count = ? , "
                   "disc_number = ? , "
                   "track_count = ? , "
@@ -1349,9 +1365,9 @@
                   "stop_time = ? , "
                   "eq_preset = ? , "
                   "relative_volume = ? , "
-                  "sample_rate = ? , "
+                  "bitrate = ? , "
                   "bpm = ?  "
-                  "WHERE intid = ? ;");
+                  "WHERE song_id = ? ;");
 
     query.bindValue(0,  an_item->getTitle().utf8());
     query.bindValue(1,  an_item->getArtist().utf8());
@@ -1467,14 +1483,12 @@
 
     MSqlQuery query(MSqlQuery::InitCon());
 
-    query.prepare("SELECT name, songlist, playlistid FROM musicplaylist "
+    query.prepare("SELECT playlist_name, playlist_songs, playlist_id FROM music_saved_playlists "
                   "WHERE name != ? "
-                  "AND name != ? "
-                  "AND hostname = ? ;");
+                  "AND name != ? ;");
         
     query.bindValue(0, "backup_playlist_storage");
     query.bindValue(1, "default_playlist_storage");
-    query.bindValue(2, hostname);
         
     query.exec();
 
@@ -1617,8 +1631,8 @@
     
     MSqlQuery query(MSqlQuery::InitCon());
 
-    query.prepare("UPDATE musicplaylist SET songlist = ?, name = ? WHERE "
-                  "playlistid = ? ;");
+    query.prepare("UPDATE music_saved_playlists SET playlist_songs = ?, playlist_name = ? WHERE "
+                  "playlist_id = ? ;");
 
     query.bindValue(0, db_song_list_string);
     query.bindValue(1, a_playlist->getName().utf8());
@@ -1665,7 +1679,7 @@
     
     MSqlQuery query(MSqlQuery::InitCon());
 
-    query.prepare("INSERT INTO musicplaylist (name, hostname, songlist) values (?, ?, ?) ; ");
+    query.prepare("INSERT INTO music_saved_playlists (playlist_name, hostname, playlist_songs) values (?, ?, ?) ; ");
 
     query.bindValue(0, a_playlist->getName().utf8());
     query.bindValue(1, hostname);
@@ -1681,7 +1695,7 @@
         return;
     }
     
-    query.prepare("SELECT playlistid FROM musicplaylist WHERE name = ? AND hostname = ? AND songlist = ? ; ");
+    query.prepare("SELECT playlist_id FROM music_saved_playlists WHERE playlist_name = ? AND hostname = ? AND playlist_songs = ? ; ");
 
     query.bindValue(0, a_playlist->getName().utf8());
     query.bindValue(1, hostname);
@@ -1776,7 +1790,7 @@
 
     MSqlQuery query(MSqlQuery::InitCon());
 
-    query.prepare("DELETE FROM musicplaylist WHERE playlistid = ? ; ");
+    query.prepare("DELETE FROM music_saved_playlists WHERE playlist_id = ? ; ");
 
     query.bindValue(0, playlist_database_id);
         
Index: mfd/mfd.pro
===================================================================
--- mfd/mfd.pro	(revision 9761)
+++ mfd/mfd.pro	(working copy)
@@ -24,8 +24,8 @@
 TARGET = mfd
 
 LIBS += -lmyth-$$LIBVERSION 
+LIBS += -lmythui-$$LIBVERSION -lGL
 
-
 !isEmpty(USE_WMA_AUDIO){
 LIBS += -lmythavformat-$$LIBVERSION
 LIBS += -lmythavcodec-$$LIBVERSION
Index: mfdlib/avfdecoder.cpp
===================================================================
--- mfdlib/avfdecoder.cpp	(revision 9761)
+++ mfdlib/avfdecoder.cpp	(working copy)
@@ -232,7 +232,7 @@
 
     if (output())
     {
-        output()->Reconfigure(16, audio_dec->channels, audio_dec->sample_rate);
+        output()->Reconfigure(16, audio_dec->channels, audio_dec->sample_rate, false);
         output()->SetSourceBitrate(audio_dec->bit_rate);
     }
 
Index: mfdlib/aacdecoder.cpp
===================================================================
--- mfdlib/aacdecoder.cpp	(revision 9761)
+++ mfdlib/aacdecoder.cpp	(working copy)
@@ -383,7 +383,7 @@
 
     if (output()) 
     {
-        output()->Reconfigure(16, channels, sample_rate);
+        output()->Reconfigure(16, channels, sample_rate, false);
         output()->SetSourceBitrate(bitrate);
     }
 
Index: mfdlib/wavdecoder.cpp
===================================================================
--- mfdlib/wavdecoder.cpp	(revision 9761)
+++ mfdlib/wavdecoder.cpp	(working copy)
@@ -146,7 +146,7 @@
 
     if (output()) 
     {
-        output()->Reconfigure(bits_per_sample, chan, freq);
+        output()->Reconfigure(bits_per_sample, chan, freq, false);
         output()->SetSourceBitrate(bitrate);
     }
 
Index: mfdlib/flacdecoder.cpp
===================================================================
--- mfdlib/flacdecoder.cpp	(revision 9761)
+++ mfdlib/flacdecoder.cpp	(working copy)
@@ -157,7 +157,7 @@
     
     if (output())
     {
-        output()->Reconfigure(bitspersample, chan, freq);
+        output()->Reconfigure(bitspersample, chan, freq, false);
         output()->SetSourceBitrate(44100 * 2 * 16);
     }
 
Index: mfdlib/cddecoder.cpp
===================================================================
--- mfdlib/cddecoder.cpp	(revision 9761)
+++ mfdlib/cddecoder.cpp	(working copy)
@@ -175,7 +175,7 @@
 
     if (output())
     {
-        output()->Reconfigure(16, chan, freq);
+        output()->Reconfigure(16, chan, freq, false);
         output()->SetSourceBitrate(44100 * 2 * 16);
     }
 
Index: mfdlib/maddecoder.cpp
===================================================================
--- mfdlib/maddecoder.cpp	(revision 9761)
+++ mfdlib/maddecoder.cpp	(working copy)
@@ -132,7 +132,7 @@
 
     if (output())
     {
-        output()->Reconfigure(16, channels, freq);
+        output()->Reconfigure(16, channels, freq, false);
         output()->SetSourceBitrate(bitrate);
     }
 
Index: mfdlib/vorbisdecoder.cpp
===================================================================
--- mfdlib/vorbisdecoder.cpp	(revision 9761)
+++ mfdlib/vorbisdecoder.cpp	(working copy)
@@ -233,7 +233,7 @@
 
     if (output()) 
     {
-        output()->Reconfigure(16, chan, freq);
+	output()->Reconfigure(16, chan, freq, false);
         output()->SetSourceBitrate(bitrate);
     }
 
