This commit is contained in:
Arnaud Bienner 2011-11-29 13:57:42 +01:00
commit b9bf35948a
11 changed files with 58 additions and 39 deletions

View File

@ -126,6 +126,7 @@ add_subdirectory(Renderer)
#ADD_DEFINITIONS(-DCMAKE_INSTALL_PREFIX="\\\"${CMAKE_INSTALL_PREFIX}\\\"")
FIND_PACKAGE(X11)
FIND_PACKAGE(OpenGL)
@ -139,7 +140,7 @@ IF(USE_OPENMP AND SUPPORTS_OPENMP)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp ")
ENDIF(USE_OPENMP AND SUPPORTS_OPENMP)
INCLUDE_DIRECTORIES(${projectM_SOURCE_DIR} ${FTGL_INCLUDE_DIRS} ${Renderer_SOURCE_DIR} ${PRESET_FACTORY_SOURCES})
INCLUDE_DIRECTORIES(${projectM_SOURCE_DIR} ${FTGL_INCLUDE_DIRS} ${X11_INCLUDE_DIR} ${Renderer_SOURCE_DIR} ${PRESET_FACTORY_SOURCES})
LINK_DIRECTORIES(${FTGL_LIBRARY_DIRS} ${Renderer_BINARY_DIR} ${PRESET_FACTORY_BINARY_DIR})
if(MSVC)

View File

@ -63,6 +63,7 @@ extern FILE *fmemopen(void *buf, size_t len, const char *pMode);
#ifdef LINUX
#include <cstdlib>
#include <cmath>
#define projectM_isnan isnan
#endif

View File

@ -36,6 +36,8 @@
#include <cmath>
#include "BeatDetect.hpp"
using namespace std;
BeatDetect::BeatDetect(PCM *pcm) {
int x,y;

View File

@ -17,7 +17,9 @@ else(MSVC)
SET (MATH_LIBRARIES m)
endif(MSVC)
INCLUDE_DIRECTORIES(${projectM_SOURCE_DIR})
FIND_PACKAGE(X11)
INCLUDE_DIRECTORIES(${projectM_SOURCE_DIR} ${X11_INCLUDE_DIR})
ADD_LIBRARY(Renderer STATIC ${Renderer_SOURCES})
SET_TARGET_PROPERTIES(Renderer PROPERTIES VERSION 2.00 SOVERSION 2)
TARGET_LINK_LIBRARIES(Renderer ${MATH_LIBRARIES} projectM)

View File

@ -9,6 +9,9 @@ set(QXT-MOC-HEADERS
qxtglobalshortcut.h
)
find_package(X11)
include_directories(${X11_INCLUDE_DIR})
if(WIN32)
set(QXT-SOURCES ${QXT-SOURCES} qxtglobalshortcut_win.cpp)
elseif(APPLE)

View File

@ -1,3 +1,3 @@
# Increment this whenever the user needs to download a new blob
# Remember to upload and sign the new version of the blob.
set(SPOTIFY_BLOB_VERSION 10)
set(SPOTIFY_BLOB_VERSION 11)

View File

@ -1,7 +1,7 @@
ALTER TABLE %allsongstables ADD COLUMN effective_albumartist TEXT;
UPDATE %allsongstables SET effective_albumartist = albumartist;
UPDATE songs SET effective_albumartist = albumartist;
UPDATE %allsongstables SET effective_albumartist = artist WHERE effective_albumartist = "";
UPDATE songs SET effective_albumartist = artist WHERE effective_albumartist = "";
UPDATE schema_version SET version=36;

View File

@ -61,7 +61,7 @@ bool MediaPipeline::Init(int sample_rate, int channels) {
return false;
}
// Add elements to the pipelin and link them
// Add elements to the pipeline and link them
gst_bin_add(GST_BIN(pipeline_), GST_ELEMENT(appsrc_));
gst_bin_add(GST_BIN(pipeline_), gdppay);
gst_bin_add(GST_BIN(pipeline_), tcpsink_);
@ -74,6 +74,10 @@ bool MediaPipeline::Init(int sample_rate, int channels) {
// We know the time of each buffer
g_object_set(G_OBJECT(appsrc_), "format", GST_FORMAT_TIME, NULL);
// Spotify only pushes data to us every 100ms, so keep the appsrc half full
// to prevent tiny stalls.
g_object_set(G_OBJECT(appsrc_), "min-percent", 50, NULL);
// Set callbacks for when to start/stop pushing data
GstAppSrcCallbacks callbacks;
callbacks.enough_data = EnoughDataCallback;
@ -122,8 +126,6 @@ void MediaPipeline::WriteData(const char* data, qint64 length) {
GST_BUFFER_TIMESTAMP(buffer) = offset_bytes_ * kNsecPerSec / byte_rate_;
GST_BUFFER_DURATION(buffer) = length * kNsecPerSec / byte_rate_;
//qLog(Debug) << GST_BUFFER_OFFSET(buffer) << GST_BUFFER_TIMESTAMP(buffer) << GST_BUFFER_DURATION(buffer);
offset_bytes_ += length;
GST_BUFFER_OFFSET_END(buffer) = offset_bytes_;

View File

@ -27,6 +27,9 @@ include_directories(${QTIOCOMPRESSOR_INCLUDE_DIRS})
include_directories(${QXT_INCLUDE_DIRS})
include_directories(${ECHONEST_INCLUDE_DIRS})
find_package(OpenGL)
include_directories(${OPENGL_INCLUDE_DIR})
if(HAVE_LIBINDICATE)
link_directories(${INDICATEQT_LIBRARY_DIRS})
include_directories(${INDICATEQT_INCLUDE_DIRS})
@ -973,7 +976,6 @@ target_link_libraries(clementine_lib
${QTSINGLECOREAPPLICATION_LIBRARIES}
${QTIOCOMPRESSOR_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
dl
z
)
@ -1082,7 +1084,8 @@ if (LINUX)
# command but they're actually used by libraries that appear after them, so
# they end up getting ignored. This appends them to the very end of the link
# line, ensuring they're always used.
target_link_libraries(clementine_lib -lX11 -ldl)
find_package(X11)
target_link_libraries(clementine_lib ${X11_X11_LIB})
endif (LINUX)
add_dependencies(clementine_lib qtsingleapplication)

View File

@ -777,12 +777,17 @@ void Playlist::MoveItemsWithoutUndo(int start, const QList<int>& dest_rows) {
layoutAboutToBeChanged();
PlaylistItemList moved_items;
if (start == -1)
if (start == -1) {
start = items_.count() - dest_rows.count();
} else {
foreach (int dest_row, dest_rows) {
if (start >= dest_row)
start--;
}
}
// Take the items out of the list first, keeping track of whether the
// insertion point changes
for (int i=start ; i<start + dest_rows.count() ; ++i)
// Take the items out of the list first
for (int i = 0; i < dest_rows.count(); i++)
moved_items << items_.takeAt(start);
// Put the items back in

View File

@ -486,7 +486,7 @@ msgstr ""
msgid "After copying..."
msgstr ""
#: playlist/playlist.cpp:1104 ui/organisedialog.cpp:52
#: playlist/playlist.cpp:1109 ui/organisedialog.cpp:52
#: ui/qtsystemtrayicon.cpp:252 ../bin/src/ui_groupbydialog.h:129
#: ../bin/src/ui_groupbydialog.h:142 ../bin/src/ui_groupbydialog.h:155
#: ../bin/src/ui_albumcoversearcher.h:110
@ -499,7 +499,7 @@ msgstr ""
msgid "Album (ideal loudness for all tracks)"
msgstr ""
#: playlist/playlist.cpp:1110 ui/organisedialog.cpp:55
#: playlist/playlist.cpp:1115 ui/organisedialog.cpp:55
#: ../bin/src/ui_edittagdialog.h:658
msgid "Album artist"
msgstr ""
@ -641,7 +641,7 @@ msgstr ""
msgid "Are you sure you want to reset this song's statistics?"
msgstr ""
#: playlist/playlist.cpp:1103 ui/organisedialog.cpp:53
#: playlist/playlist.cpp:1108 ui/organisedialog.cpp:53
#: ui/qtsystemtrayicon.cpp:250 ../bin/src/ui_groupbydialog.h:130
#: ../bin/src/ui_groupbydialog.h:143 ../bin/src/ui_groupbydialog.h:156
#: ../bin/src/ui_albumcoversearcher.h:106
@ -709,7 +709,7 @@ msgstr ""
msgid "Average image size"
msgstr ""
#: playlist/playlist.cpp:1119 ui/organisedialog.cpp:59
#: playlist/playlist.cpp:1124 ui/organisedialog.cpp:59
#: ../bin/src/ui_edittagdialog.h:638
msgid "BPM"
msgstr ""
@ -755,7 +755,7 @@ msgstr ""
msgid "Biography from %1"
msgstr ""
#: playlist/playlist.cpp:1120 ../bin/src/ui_edittagdialog.h:640
#: playlist/playlist.cpp:1125 ../bin/src/ui_edittagdialog.h:640
msgid "Bit rate"
msgstr ""
@ -973,7 +973,7 @@ msgstr ""
msgid "Comma separated list of class:level, level is 0-3"
msgstr ""
#: playlist/playlist.cpp:1129 smartplaylists/searchterm.cpp:279
#: playlist/playlist.cpp:1134 smartplaylists/searchterm.cpp:279
#: ui/organisedialog.cpp:62 ../bin/src/ui_edittagdialog.h:661
msgid "Comment"
msgstr ""
@ -986,7 +986,7 @@ msgstr ""
msgid "Complete tags automatically..."
msgstr ""
#: playlist/playlist.cpp:1111 ui/organisedialog.cpp:56
#: playlist/playlist.cpp:1116 ui/organisedialog.cpp:56
#: ../bin/src/ui_groupbydialog.h:132 ../bin/src/ui_groupbydialog.h:145
#: ../bin/src/ui_groupbydialog.h:158 ../bin/src/ui_edittagdialog.h:659
msgid "Composer"
@ -1233,11 +1233,11 @@ msgstr ""
msgid "Dance"
msgstr ""
#: playlist/playlist.cpp:1127 ../bin/src/ui_edittagdialog.h:649
#: playlist/playlist.cpp:1132 ../bin/src/ui_edittagdialog.h:649
msgid "Date created"
msgstr ""
#: playlist/playlist.cpp:1126 ../bin/src/ui_edittagdialog.h:648
#: playlist/playlist.cpp:1131 ../bin/src/ui_edittagdialog.h:648
msgid "Date modified"
msgstr ""
@ -1372,7 +1372,7 @@ msgstr ""
msgid "Disabled"
msgstr ""
#: playlist/playlist.cpp:1107 ui/organisedialog.cpp:58
#: playlist/playlist.cpp:1112 ui/organisedialog.cpp:58
#: ../bin/src/ui_edittagdialog.h:655
msgid "Disc"
msgstr ""
@ -1729,19 +1729,19 @@ msgstr ""
msgid "File formats"
msgstr ""
#: playlist/playlist.cpp:1122 ../bin/src/ui_edittagdialog.h:650
#: playlist/playlist.cpp:1127 ../bin/src/ui_edittagdialog.h:650
msgid "File name"
msgstr ""
#: playlist/playlist.cpp:1123
#: playlist/playlist.cpp:1128
msgid "File name (without path)"
msgstr ""
#: playlist/playlist.cpp:1124 ../bin/src/ui_edittagdialog.h:644
#: playlist/playlist.cpp:1129 ../bin/src/ui_edittagdialog.h:644
msgid "File size"
msgstr ""
#: playlist/playlist.cpp:1125 ../bin/src/ui_groupbydialog.h:133
#: playlist/playlist.cpp:1130 ../bin/src/ui_groupbydialog.h:133
#: ../bin/src/ui_groupbydialog.h:146 ../bin/src/ui_groupbydialog.h:159
#: ../bin/src/ui_edittagdialog.h:646
msgid "File type"
@ -1874,7 +1874,7 @@ msgstr ""
msgid "General settings"
msgstr ""
#: playlist/playlist.cpp:1109 ui/organisedialog.cpp:61
#: playlist/playlist.cpp:1114 ui/organisedialog.cpp:61
#: ../bin/src/ui_groupbydialog.h:134 ../bin/src/ui_groupbydialog.h:147
#: ../bin/src/ui_groupbydialog.h:160 ../bin/src/ui_edittagdialog.h:660
msgid "Genre"
@ -2205,7 +2205,7 @@ msgstr ""
msgid "Large sidebar"
msgstr ""
#: library/library.cpp:66 playlist/playlist.cpp:1116
#: library/library.cpp:66 playlist/playlist.cpp:1121
#: ../bin/src/ui_edittagdialog.h:641
msgid "Last played"
msgstr ""
@ -2284,7 +2284,7 @@ msgstr ""
msgid "Leave blank for the default. Examples: \"/dev/dsp\", \"front\", etc."
msgstr ""
#: playlist/playlist.cpp:1105 ui/organisedialog.cpp:63
#: playlist/playlist.cpp:1110 ui/organisedialog.cpp:63
#: ui/qtsystemtrayicon.cpp:255 ../bin/src/ui_edittagdialog.h:636
msgid "Length"
msgstr ""
@ -2905,7 +2905,7 @@ msgstr ""
msgid "Play artist radio..."
msgstr ""
#: playlist/playlist.cpp:1114 ../bin/src/ui_edittagdialog.h:637
#: playlist/playlist.cpp:1119 ../bin/src/ui_edittagdialog.h:637
msgid "Play count"
msgstr ""
@ -3153,7 +3153,7 @@ msgstr ""
msgid "Rate the current song 5 stars"
msgstr ""
#: playlist/playlist.cpp:1113 ../bin/src/ui_edittagdialog.h:645
#: playlist/playlist.cpp:1118 ../bin/src/ui_edittagdialog.h:645
msgid "Rating"
msgstr ""
@ -3334,7 +3334,7 @@ msgstr ""
msgid "Safely remove the device after copying"
msgstr ""
#: playlist/playlist.cpp:1121 ../bin/src/ui_edittagdialog.h:642
#: playlist/playlist.cpp:1126 ../bin/src/ui_edittagdialog.h:642
msgid "Sample rate"
msgstr ""
@ -3378,7 +3378,7 @@ msgstr ""
msgid "Scalable sampling rate profile (SSR)"
msgstr ""
#: playlist/playlist.cpp:1117 ../bin/src/ui_edittagdialog.h:643
#: playlist/playlist.cpp:1122 ../bin/src/ui_edittagdialog.h:643
msgid "Score"
msgstr ""
@ -3672,7 +3672,7 @@ msgstr ""
msgid "Skip backwards in playlist"
msgstr ""
#: playlist/playlist.cpp:1115 ../bin/src/ui_edittagdialog.h:639
#: playlist/playlist.cpp:1120 ../bin/src/ui_edittagdialog.h:639
msgid "Skip count"
msgstr ""
@ -4043,7 +4043,7 @@ msgstr ""
msgid "Timezone"
msgstr ""
#: playlist/playlist.cpp:1102 ui/organisedialog.cpp:51
#: playlist/playlist.cpp:1107 ui/organisedialog.cpp:51
#: ui/qtsystemtrayicon.cpp:248 ../bin/src/ui_about.h:142
#: ../bin/src/ui_edittagdialog.h:652 ../bin/src/ui_trackselectiondialog.h:211
msgid "Title"
@ -4081,7 +4081,7 @@ msgstr ""
msgid "Total network requests made"
msgstr ""
#: playlist/playlist.cpp:1106 ui/organisedialog.cpp:57
#: playlist/playlist.cpp:1111 ui/organisedialog.cpp:57
#: ../bin/src/ui_edittagdialog.h:653 ../bin/src/ui_trackselectiondialog.h:212
msgid "Track"
msgstr ""
@ -4396,7 +4396,7 @@ msgstr ""
msgid "Would you like to run a full rescan right now?"
msgstr ""
#: playlist/playlist.cpp:1108 ui/organisedialog.cpp:60
#: playlist/playlist.cpp:1113 ui/organisedialog.cpp:60
#: ../bin/src/ui_groupbydialog.h:135 ../bin/src/ui_groupbydialog.h:148
#: ../bin/src/ui_groupbydialog.h:161 ../bin/src/ui_edittagdialog.h:657
msgid "Year"