You can subscribe to this list here.
| 2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(25) |
Jul
(288) |
Aug
(119) |
Sep
(31) |
Oct
(59) |
Nov
(458) |
Dec
(359) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2010 |
Jan
(268) |
Feb
(26) |
Mar
(36) |
Apr
(48) |
May
(119) |
Jun
(37) |
Jul
(173) |
Aug
(429) |
Sep
(137) |
Oct
(156) |
Nov
(59) |
Dec
(45) |
| 2011 |
Jan
(398) |
Feb
(257) |
Mar
(49) |
Apr
(5) |
May
(34) |
Jun
(11) |
Jul
(38) |
Aug
(12) |
Sep
(1) |
Oct
(49) |
Nov
(5) |
Dec
(10) |
| 2012 |
Jan
(21) |
Feb
(32) |
Mar
(20) |
Apr
(1) |
May
(2) |
Jun
|
Jul
(173) |
Aug
|
Sep
(25) |
Oct
(6) |
Nov
(44) |
Dec
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-07-06 03:15:19
|
Module: performous
Branch: master
Commit: 55046de84bc17a61e0fedbcdf4ebce30e26e8d71
Author: Lasse Karkkainen <tro...@tr...>
Date: Mon Jul 6 06:14:31 2009 +0300
Make ALSA driver debug to log (stderr) instead of stdout.
---
libs/libda/plugins/audio_dev_alsa.cpp | 25 +++++++++++++------------
1 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/libs/libda/plugins/audio_dev_alsa.cpp b/libs/libda/plugins/audio_dev_alsa.cpp
index 5ced24c..16ac0b8 100644
--- a/libs/libda/plugins/audio_dev_alsa.cpp
+++ b/libs/libda/plugins/audio_dev_alsa.cpp
@@ -29,17 +29,18 @@ namespace {
if (snd_ctl_pcm_info(ctl, pcminfo) < 0) continue;
std::string device = std::string("alsa:hw:") + snd_ctl_card_info_get_id(info) + "," + boost::lexical_cast<std::string>(dev);
std::string desc = std::string(snd_ctl_card_info_get_name(info)) + " (" + snd_pcm_info_get_name(pcminfo) + ")";
- std::cout << " " << device << " " << desc << std::endl;
+ std::clog << " " << device << " " << desc << std::endl;
}
}
}
struct Foo {
Foo() {
- std::cout << "ALSA capture devices:" << std::endl;
+ std::clog << "ALSA capture devices:\n";
devices(SND_PCM_STREAM_CAPTURE);
- std::cout << "ALSA playback devices:" << std::endl;
+ std::clog << "ALSA playback devices:\n";
devices(SND_PCM_STREAM_PLAYBACK);
+ std::clog << std::endl;
}
} foo;
@@ -82,15 +83,15 @@ namespace {
/*
void status(alsa::pcm& pcm) {
switch (snd_pcm_state(pcm)) {
- case SND_PCM_STATE_OPEN: std::cout << "ALSA pcm state: OPEN" << std::endl; break;
- case SND_PCM_STATE_SETUP: std::cout << "ALSA pcm state: SETUP" << std::endl; break;
- case SND_PCM_STATE_PREPARED: std::cout << "ALSA pcm state: PREPARED" << std::endl; break;
- case SND_PCM_STATE_RUNNING: std::cout << "ALSA pcm state: RUNNING" << std::endl; break;
- case SND_PCM_STATE_XRUN: std::cout << "ALSA pcm state: XRUN" << std::endl; break;
- case SND_PCM_STATE_DRAINING: std::cout << "ALSA pcm state: DRAINING" << std::endl; break;
- case SND_PCM_STATE_PAUSED: std::cout << "ALSA pcm state: PAUSED" << std::endl; break;
- case SND_PCM_STATE_SUSPENDED: std::cout << "ALSA pcm state: SUSPENDED" << std::endl; break;
- case SND_PCM_STATE_DISCONNECTED: std::cout << "ALSA pcm state: DISCONNECTED" << std::endl; break;
+ case SND_PCM_STATE_OPEN: std::clog << "ALSA pcm state: OPEN" << std::endl; break;
+ case SND_PCM_STATE_SETUP: std::clog << "ALSA pcm state: SETUP" << std::endl; break;
+ case SND_PCM_STATE_PREPARED: std::clog << "ALSA pcm state: PREPARED" << std::endl; break;
+ case SND_PCM_STATE_RUNNING: std::clog << "ALSA pcm state: RUNNING" << std::endl; break;
+ case SND_PCM_STATE_XRUN: std::clog << "ALSA pcm state: XRUN" << std::endl; break;
+ case SND_PCM_STATE_DRAINING: std::clog << "ALSA pcm state: DRAINING" << std::endl; break;
+ case SND_PCM_STATE_PAUSED: std::clog << "ALSA pcm state: PAUSED" << std::endl; break;
+ case SND_PCM_STATE_SUSPENDED: std::clog << "ALSA pcm state: SUSPENDED" << std::endl; break;
+ case SND_PCM_STATE_DISCONNECTED: std::clog << "ALSA pcm state: DISCONNECTED" << std::endl; break;
}
}
*/
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-07-06 03:15:17
|
Module: performous
Branch: master
Commit: f222f8d2e0516b7a529d987a12f49fbef0960c4d
Author: Lasse Karkkainen <tro...@tr...>
Date: Mon Jul 6 06:10:57 2009 +0300
Fix michelp and pdevhelp commandline options.
---
game/main.cc | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/game/main.cc b/game/main.cc
index c6957e4..4b935b4 100644
--- a/game/main.cc
+++ b/game/main.cc
@@ -221,10 +221,16 @@ int main(int argc, char** argv) {
return 1;
}
po::notify(vm);
+ if (vm.count("version")) {
+ std::cout << PACKAGE << ' ' << VERSION << std::endl;
+ return 0;
+ }
if (vm.count("help")) {
std::cout << cmdline << std::endl;
return 0;
}
+ // Initialize audio for pdevhelp, michelp and the rest of the program
+ da::initialize libda;
if (vm.count("pdevhelp")) {
da::playback::devlist_t l = da::playback::devices();
std::cout << "Specify with --pdev [OPTIONS@]dev[:settings]]. For example:\n"
@@ -255,12 +261,6 @@ int main(int argc, char** argv) {
}
return 0;
}
- if (vm.count("version")) {
- std::cout << PACKAGE << ' ' << VERSION << std::endl;
- return 0;
- }
- // Initialize audio
- da::initialize libda;
// Read config files
try {
readConfig();
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-07-06 02:53:13
|
Module: performous Branch: master Commit: 47765e235579eeff3a8cfc5f2faba0000f2aba56 Author: Lasse Karkkainen <tro...@tr...> Date: Mon Jul 6 05:52:47 2009 +0300 Man page corrections. --- docs/performous.h2m | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/docs/performous.h2m b/docs/performous.h2m index 663ae53..27fb766 100644 --- a/docs/performous.h2m +++ b/docs/performous.h2m @@ -63,7 +63,7 @@ Randomize songs (sort them again) Refresh song list (reload from disk) .TP \fBF4\fR -Enter jukebox mode (play songs entirely, hide song browser) +Enter jukebox mode (play songs entirely, hide song browser, allow seeking with Up/Down) .TP \fBEsc\fR Exit to main menu, exit jukebox mode or quit search mode @@ -79,6 +79,9 @@ Skip long instrumental breaks, or get the grading instantly at the end of song. \fBPause\fR or \fBSpace\fR Pause the game .TP +\fBF4\fR +Toggle synth mode (synthesized tone for notes) +.TP \fBF5\fR/\fBF6\fR Adjust audio/video sync. Use if the notes pass the black line at incorrect time. .TP |
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-07-06 02:46:58
|
Module: performous
Branch: master
Commit: e15e8d3bd50a57877b13901919a01288429b33cc
Author: Lasse Karkkainen <tro...@tr...>
Date: Mon Jul 6 05:46:38 2009 +0300
Update packaging deps.
---
cmake/performous-packaging.cmake | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/cmake/performous-packaging.cmake b/cmake/performous-packaging.cmake
index b4b38ac..13be013 100644
--- a/cmake/performous-packaging.cmake
+++ b/cmake/performous-packaging.cmake
@@ -51,13 +51,13 @@ if(UNIX)
endif("${CPACK_PACKAGE_ARCHITECTURE}" MATCHES "x86_64")
# Set the dependencies based on the distro version
if("${LSB_DISTRIB}" MATCHES "Ubuntu8.04")
- set(CPACK_DEBIAN_PACKAGE_DEPENDS "libsdl1.2debian, libcairo2, librsvg2-2, libboost-thread1.34.1, libboost-serialization1.34.1, libboost-program-options1.34.1, libboost-regex1.34.1, libboost-filesystem1.34.1, libavcodec1d, libavformat1d, libswscale1d, libmagick++10, libsamplerate0, libxml++2.6c2a")
+ set(CPACK_DEBIAN_PACKAGE_DEPENDS "libsdl1.2debian, libcairo2, librsvg2-2, libboost-thread1.34.1, libboost-serialization1.34.1, libboost-program-options1.34.1, libboost-regex1.34.1, libboost-filesystem1.34.1, libavcodec1d, libavformat1d, libswscale1d, libmagick++10, libsamplerate0, libxml++2.6c2a, libglew1.5")
endif("${LSB_DISTRIB}" MATCHES "Ubuntu8.04")
if("${LSB_DISTRIB}" MATCHES "Ubuntu8.10")
- set(CPACK_DEBIAN_PACKAGE_DEPENDS "libsdl1.2debian, libcairo2, librsvg2-2, libboost-thread1.34.1, libboost-serialization1.34.1, libboost-program-options1.34.1, libboost-regex1.34.1, libboost-filesystem1.34.1, libavcodec51, libavformat52, libswscale0, libmagick++10, libsamplerate0, libxml++2.6-2")
+ set(CPACK_DEBIAN_PACKAGE_DEPENDS "libsdl1.2debian, libcairo2, librsvg2-2, libboost-thread1.34.1, libboost-serialization1.34.1, libboost-program-options1.34.1, libboost-regex1.34.1, libboost-filesystem1.34.1, libavcodec51, libavformat52, libswscale0, libmagick++10, libsamplerate0, libxml++2.6-2, libglew1.5")
endif("${LSB_DISTRIB}" MATCHES "Ubuntu8.10")
if("${LSB_DISTRIB}" MATCHES "Ubuntu9.04")
- set(CPACK_DEBIAN_PACKAGE_DEPENDS "libsdl1.2debian, libcairo2, librsvg2-2, libboost-thread1.34.1, libboost-program-options1.34.1, libboost-regex1.34.1, libboost-filesystem1.34.1, libavcodec51, libavformat52, libswscale0, libmagick++10, libsamplerate0, libxml++2.6-2")
+ set(CPACK_DEBIAN_PACKAGE_DEPENDS "libsdl1.2debian, libcairo2, librsvg2-2, libboost-thread1.35.0, libboost-program-options1.35.0, libboost-regex1.35.0, libboost-filesystem1.35.0, libavcodec52, libavformat52, libswscale0, libmagick++1, libsamplerate0, libxml++2.6-2, libglew1.5")
endif("${LSB_DISTRIB}" MATCHES "Ubuntu9.04")
if(NOT CPACK_DEBIAN_PACKAGE_DEPENDS)
message("WARNING: ${LSB_DISTRIB} not supported yet.\nPlease set deps in cmake/performous-packaging.cmake before packaging.")
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-07-06 02:35:43
|
Module: performous
Branch: master
Commit: ce5b0b0057568acece80789d3eb159391f7d1af2
Author: Lasse Karkkainen <tro...@tr...>
Date: Mon Jul 6 05:35:01 2009 +0300
Another attempt: referring to the executable by full path instead of by target name. Seems to be working.
---
docs/CMakeLists.txt | 21 +++++++++++++++++++++
game/CMakeLists.txt | 22 ----------------------
2 files changed, 21 insertions(+), 22 deletions(-)
diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt
index b28b04f..2263ea6 100644
--- a/docs/CMakeLists.txt
+++ b/docs/CMakeLists.txt
@@ -1,3 +1,24 @@
+if(UNIX)
+ find_program(HELP2MAN help2man DOC "Location of the help2man program")
+ find_program(GZIP gzip DOC "Location of the gzip program")
+ if(HELP2MAN AND GZIP)
+ set(MANFILE ${CMAKE_CURRENT_BINARY_DIR}/performous.1.gz)
+ set(H2MFILE ${CMAKE_CURRENT_SOURCE_DIR}/performous.h2m)
+ set(PERFORMOUS_EXEC ${CMAKE_BINARY_DIR}/game/performous)
+ add_custom_command(
+ OUTPUT ${MANFILE}
+ COMMAND ${HELP2MAN} ${PERFORMOUS_EXEC} -i ${H2MFILE} -N | ${GZIP} > ${MANFILE}
+ MAIN_DEPENDENCY ${H2MFILE}
+ DEPENDENCY ${PERFORMOUS_EXEC}
+ COMMENT "Building Performous man page"
+ VERBATIM
+ )
+ add_custom_target(manpage ALL DEPENDS ${MANFILE})
+ install(FILES ${MANFILE} DESTINATION share/man/man1)
+ else(HELP2MAN AND GZIP)
+ message("WARNING: Can't locate help2man or gzip; man pages will not be generated")
+ endif(HELP2MAN AND GZIP)
+endif(UNIX)
diff --git a/game/CMakeLists.txt b/game/CMakeLists.txt
index 0f91a21..c9584e9 100644
--- a/game/CMakeLists.txt
+++ b/game/CMakeLists.txt
@@ -43,25 +43,3 @@ include_directories("${CMAKE_CURRENT_BINARY_DIR}")
install(TARGETS performous DESTINATION bin)
-# This should really be in doc/CMakeLists.txt but for some reason the performous target is not visible there
-if(UNIX)
- find_program(HELP2MAN help2man DOC "Location of the help2man program")
- find_program(GZIP gzip DOC "Location of the gzip program")
- if(HELP2MAN AND GZIP)
- set(MANFILE ${CMAKE_CURRENT_BINARY_DIR}/performous.1.gz)
- set(H2MFILE ${CMAKE_SOURCE_DIR}/docs/performous.h2m)
- add_custom_command(
- OUTPUT ${MANFILE}
- COMMAND ${HELP2MAN} ${CMAKE_CURRENT_BINARY_DIR}/performous -i ${H2MFILE} -N | ${GZIP} > ${MANFILE}
- MAIN_DEPENDENCY ${H2MFILE}
- DEPENDENCY performous
- COMMENT "Building Performous man page"
- VERBATIM
- )
- add_custom_target(manpage ALL DEPENDS ${MANFILE})
- install(FILES ${MANFILE} DESTINATION share/man/man1)
- else(HELP2MAN AND GZIP)
- message("WARNING: Can't locate help2man or gzip; man pages will not be generated")
- endif(HELP2MAN AND GZIP)
-endif(UNIX)
-
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-07-06 02:26:56
|
Module: performous
Branch: master
Commit: 4781dc5594002b1734296bbd4d4fb44ce3a1bbbd
Author: Lasse Karkkainen <tro...@tr...>
Date: Mon Jul 6 05:26:16 2009 +0300
Generate man page in game/CMakeLists.txt instead (hack).
---
docs/CMakeLists.txt | 18 ------------------
game/CMakeLists.txt | 22 ++++++++++++++++++++++
2 files changed, 22 insertions(+), 18 deletions(-)
diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt
index 05e09d4..b28b04f 100644
--- a/docs/CMakeLists.txt
+++ b/docs/CMakeLists.txt
@@ -1,21 +1,3 @@
-if(UNIX)
- find_program(HELP2MAN help2man DOC "Location of the help2man program")
- find_program(GZIP gzip DOC "Location of the gzip program")
- if(HELP2MAN AND GZIP)
- set(MANFILE ${CMAKE_CURRENT_BINARY_DIR}/performous.1.gz)
- add_custom_command(
- OUTPUT ${MANFILE}
- COMMAND ${HELP2MAN} performous -i ${CMAKE_CURRENT_SOURCE_DIR}/performous.h2m -N | ${GZIP} > ${MANFILE}
- MAIN_DEPENDENCY performous.h2m
- COMMENT "Building Performous man page"
- VERBATIM
- )
- add_custom_target(manpage ALL DEPENDS ${MANFILE})
- install(FILES ${MANFILE} DESTINATION share/man/man1)
- else(HELP2MAN AND GZIP)
- message("WARNING: Can't locate help2man or gzip; man pages will not be generated")
- endif(HELP2MAN AND GZIP)
-endif(UNIX)
diff --git a/game/CMakeLists.txt b/game/CMakeLists.txt
index c9584e9..0f91a21 100644
--- a/game/CMakeLists.txt
+++ b/game/CMakeLists.txt
@@ -43,3 +43,25 @@ include_directories("${CMAKE_CURRENT_BINARY_DIR}")
install(TARGETS performous DESTINATION bin)
+# This should really be in doc/CMakeLists.txt but for some reason the performous target is not visible there
+if(UNIX)
+ find_program(HELP2MAN help2man DOC "Location of the help2man program")
+ find_program(GZIP gzip DOC "Location of the gzip program")
+ if(HELP2MAN AND GZIP)
+ set(MANFILE ${CMAKE_CURRENT_BINARY_DIR}/performous.1.gz)
+ set(H2MFILE ${CMAKE_SOURCE_DIR}/docs/performous.h2m)
+ add_custom_command(
+ OUTPUT ${MANFILE}
+ COMMAND ${HELP2MAN} ${CMAKE_CURRENT_BINARY_DIR}/performous -i ${H2MFILE} -N | ${GZIP} > ${MANFILE}
+ MAIN_DEPENDENCY ${H2MFILE}
+ DEPENDENCY performous
+ COMMENT "Building Performous man page"
+ VERBATIM
+ )
+ add_custom_target(manpage ALL DEPENDS ${MANFILE})
+ install(FILES ${MANFILE} DESTINATION share/man/man1)
+ else(HELP2MAN AND GZIP)
+ message("WARNING: Can't locate help2man or gzip; man pages will not be generated")
+ endif(HELP2MAN AND GZIP)
+endif(UNIX)
+
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-07-06 02:26:50
|
Module: performous
Branch: master
Commit: cad69d5e53023729ea652bbbd592f87eb829ca87
Author: Lasse Karkkainen <tro...@tr...>
Date: Mon Jul 6 05:14:31 2009 +0300
Remove faac support/requirement from ss_extract.
---
tools/CMakeLists.txt | 12 ++++++------
tools/ss_extract.cpp | 11 +++--------
2 files changed, 9 insertions(+), 14 deletions(-)
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
index 2117521..ad59253 100644
--- a/tools/CMakeLists.txt
+++ b/tools/CMakeLists.txt
@@ -12,7 +12,7 @@ find_package(Boost 1.34 REQUIRED COMPONENTS filesystem)
include_directories(${Boost_INCLUDE_DIRS})
# Find all the libs that don't require extra parameters
-foreach(lib LibXML++ Magick++ FAAC)
+foreach(lib LibXML++ Magick++)
find_package(${lib})
if (${lib}_FOUND)
include_directories(${${lib}_INCLUDE_DIRS})
@@ -28,13 +28,13 @@ if(CMAKE_COMPILER_IS_GNUCXX)
endif(CMAKE_COMPILER_IS_GNUCXX)
if (LibXML++_FOUND)
- if (Boost_FOUND AND FAAC_FOUND)
+ if (Boost_FOUND)
add_executable(ss_extract ss_extract.cpp pak.cpp ipu_conv.cpp)
- target_link_libraries(ss_extract ${LibXML++_LIBRARIES} ${Boost_LIBRARIES} ${FAAC_LIBRARIES})
+ target_link_libraries(ss_extract ${LibXML++_LIBRARIES} ${Boost_LIBRARIES})
set(targets ${targets} ss_extract)
- else (Boost_FOUND AND FAAC_FOUND)
- message("Boost.Filesystem or libfaac not found, not building ss_extract")
- endif (Boost_FOUND AND FAAC_FOUND)
+ else (Boost_FOUND)
+ message("Boost.Filesystem not found, not building ss_extract")
+ endif (Boost_FOUND)
if (Magick++_FOUND)
add_executable(cover_conv cover_conv.cpp pak.cpp)
diff --git a/tools/ss_extract.cpp b/tools/ss_extract.cpp
index 174bf04..bb6f35e 100644
--- a/tools/ss_extract.cpp
+++ b/tools/ss_extract.cpp
@@ -15,7 +15,6 @@
#include <boost/filesystem.hpp>
-#include "faac.hh"
#include "pak.h"
#include "ipuconv.hh"
@@ -29,7 +28,6 @@ xmlpp::Node::PrefixNsMap nsmap;
std::string ns;
const bool video = true;
const bool mkvcompress = false;
-const bool aacenc = false;
// LibXML2 logging facility
extern "C" void xmlLogger(void* logger, char const* msg, ...) { if (logger) *(std::ostream*)logger << msg; }
@@ -158,11 +156,8 @@ void writeWavHeader(std::ostream& outfile, unsigned ch, unsigned sr, unsigned sa
void writeMusic(fs::path const& filename, std::vector<short> const& buf, unsigned sr) {
std::ofstream f(filename.string().c_str(), std::ios::binary);
- if (aacenc) faac::Enc(sr, 2, f)(buf.begin(), buf.end()).close();
- else {
- writeWavHeader(f, 2, sr, buf.size());
- f.write(reinterpret_cast<char const*>(&buf[0]), buf.size() * sizeof(short));
- }
+ writeWavHeader(f, 2, sr, buf.size());
+ f.write(reinterpret_cast<char const*>(&buf[0]), buf.size() * sizeof(short));
}
void music(Song& song, PakFile const& dataFile, PakFile const& headerFile, fs::path const& outPath) {
@@ -190,7 +185,7 @@ void music(Song& song, PakFile const& dataFile, PakFile const& headerFile, fs::p
if (l2 != 0 || r2 != 0) karaoke = true;
}
}
- std::string ext = (aacenc ? ".m4a" : ".wav");
+ std::string ext = ".wav";
writeMusic(song.music = outPath / ("music" + ext), pcm[0], sr);
if (karaoke) writeMusic(song.vocals = outPath / ("vocals" + ext), pcm[1], sr);
}
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-07-06 02:06:47
|
Module: performous
Branch: master
Commit: dd2b8be407aaccf3cd5d5daff154f7785976430b
Author: Lasse Karkkainen <tro...@tr...>
Date: Mon Jul 6 04:58:35 2009 +0300
Downgrade Spirit code so that we can run on Boost 1.34 instead of 1.36.
---
game/main.cc | 5 +++--
libs/libda/plugins/CMakeLists.txt | 2 +-
libs/libda/plugins/audio_dev_tone.cpp | 5 +++--
3 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/game/main.cc b/game/main.cc
index fcf3ea2..c6957e4 100644
--- a/game/main.cc
+++ b/game/main.cc
@@ -10,7 +10,8 @@
#include "xtime.hh"
#include <boost/format.hpp>
#include <boost/program_options.hpp>
-#include <boost/spirit/include/classic_core.hpp>
+// Needs at least Boost 1.36 and many systems don't have that: #include <boost/spirit/include/classic_core.hpp>
+#include <boost/spirit/core.hpp>
#include <boost/thread.hpp>
#include <libda/audio.hpp>
#include <csignal>
@@ -76,7 +77,7 @@ static void checkEvents_SDL(ScreenManager& sm, Window& window) {
void audioSetup(Capture& capture, Audio& audio) {
// initialize audio argument parser
- using namespace boost::spirit::classic;
+ using namespace boost::spirit; //::classic;
unsigned channels, rate, frames;
std::string devstr;
// channel ::= "channel=" integer
diff --git a/libs/libda/plugins/CMakeLists.txt b/libs/libda/plugins/CMakeLists.txt
index 1dd67c2..2699172 100644
--- a/libs/libda/plugins/CMakeLists.txt
+++ b/libs/libda/plugins/CMakeLists.txt
@@ -98,7 +98,7 @@ endif(LIBDA_PLUGIN_PULSE)
if(LIBDA_PLUGIN_TESTING)
set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_MULTITHREAD ON)
- find_package(Boost 1.36 REQUIRED COMPONENTS thread date_time)
+ find_package(Boost 1.34 REQUIRED COMPONENTS thread date_time)
if(Boost_FOUND)
set(PLUGIN_TESTING_DESC "enabled")
set(PLUGIN_TESTING true)
diff --git a/libs/libda/plugins/audio_dev_tone.cpp b/libs/libda/plugins/audio_dev_tone.cpp
index 1f2365e..a0140f1 100644
--- a/libs/libda/plugins/audio_dev_tone.cpp
+++ b/libs/libda/plugins/audio_dev_tone.cpp
@@ -2,7 +2,8 @@
#include <boost/scoped_ptr.hpp>
#include <boost/lambda/lambda.hpp>
#include <boost/lambda/bind.hpp>
-#include <boost/spirit/include/classic_core.hpp>
+// Needs at least Boost 1.36 and many systems don't have that: #include <boost/spirit/include/classic_core.hpp>
+#include <boost/spirit/core.hpp>
#include <boost/thread/thread.hpp>
#include <boost/thread/xtime.hpp>
#include <algorithm>
@@ -59,7 +60,7 @@ namespace {
boost::xtime time;
void add(std::string const& tonestr) {
double freq = 440.0, amplitude = 0.1, phase = 0.0;
- using namespace boost::spirit::classic;
+ using namespace boost::spirit; //::classic;
using namespace boost::lambda;
placeholder1_type arg1;
if (!parse(tonestr.c_str(),
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-07-06 02:06:44
|
Module: performous Branch: master Commit: a71c8cac81264e50264cffc61d2948adf470cc38 Author: Lasse Karkkainen <tro...@tr...> Date: Mon Jul 6 05:04:49 2009 +0300 Merge branch 'master' of ssh://tronic@performous.git.sourceforge.net/gitroot/performous --- |
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-07-06 02:04:49
|
Module: performous Branch: master Commit: b59923bc9e557e8c6dde31a99ed4a3bb730a7204 Author: Lasse Karkkainen <tro...@tr...> Date: Sun Jul 5 04:57:25 2009 +0200 Merge branch 'master' of ssh://tronic@performous.git.sourceforge.net/gitroot/performous --- |
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-07-06 02:04:42
|
Module: performous
Branch: master
Commit: 4cf987042850f2febfd554dcabf76b47302e4ec8
Author: Lasse Karkkainen <tro...@tr...>
Date: Sun Jul 5 04:56:17 2009 +0200
Workaround a C++ defect that makes our old code invalid (and it doesn't compile on MSVC debug mode).
---
game/song.cc | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/game/song.cc b/game/song.cc
index 6cc61bf..95070b8 100644
--- a/game/song.cc
+++ b/game/song.cc
@@ -266,11 +266,13 @@ std::string Song::collate(std::string const& str) {
}
namespace {
- bool noteEndLessThan(Note const& n, double time) { return n.end < time; }
+ // Cannot simply take double as its second argument because of a C++ defect
+ bool noteEndLessThan(Note const& a, Note const& b) { return a.end < b.end; }
}
Song::Status Song::status(double time) const {
- Notes::const_iterator it = std::lower_bound(notes.begin(), notes.end(), time, noteEndLessThan);
+ Note target; target.end = time;
+ Notes::const_iterator it = std::lower_bound(notes.begin(), notes.end(), target, noteEndLessThan);
if (it == notes.end()) return FINISHED;
if (it->begin > time + 4.0) return INSTRUMENTAL_BREAK;
return NORMAL;
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-07-06 01:29:50
|
Module: performous
Branch: master
Commit: f8b9e4c2f4e0d5ded81e00c9b09139b293bc3e89
Author: Lasse Karkkainen <tro...@tr...>
Date: Mon Jul 6 04:14:53 2009 +0300
Build and install man page.
Added info about audio device configuration to the man page.
---
CMakeLists.txt | 1 +
docs/CMakeLists.txt | 21 +++++++++++++++++++++
docs/performous.h2m | 7 ++++++-
3 files changed, 28 insertions(+), 1 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1dc2046..e77d0d5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -33,6 +33,7 @@ add_subdirectory(libs)
add_subdirectory(themes)
add_subdirectory(data)
add_subdirectory(game)
+add_subdirectory(docs)
option(ENABLE_TOOLS "Enable extra tools (e.g. Singstar ripper)" ON)
diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt
new file mode 100644
index 0000000..05e09d4
--- /dev/null
+++ b/docs/CMakeLists.txt
@@ -0,0 +1,21 @@
+
+if(UNIX)
+ find_program(HELP2MAN help2man DOC "Location of the help2man program")
+ find_program(GZIP gzip DOC "Location of the gzip program")
+ if(HELP2MAN AND GZIP)
+ set(MANFILE ${CMAKE_CURRENT_BINARY_DIR}/performous.1.gz)
+ add_custom_command(
+ OUTPUT ${MANFILE}
+ COMMAND ${HELP2MAN} performous -i ${CMAKE_CURRENT_SOURCE_DIR}/performous.h2m -N | ${GZIP} > ${MANFILE}
+ MAIN_DEPENDENCY performous.h2m
+ COMMENT "Building Performous man page"
+ VERBATIM
+ )
+ add_custom_target(manpage ALL DEPENDS ${MANFILE})
+ install(FILES ${MANFILE} DESTINATION share/man/man1)
+ else(HELP2MAN AND GZIP)
+ message("WARNING: Can't locate help2man or gzip; man pages will not be generated")
+ endif(HELP2MAN AND GZIP)
+endif(UNIX)
+
+
diff --git a/docs/performous.h2m b/docs/performous.h2m
index ae9cfe6..663ae53 100644
--- a/docs/performous.h2m
+++ b/docs/performous.h2m
@@ -1,7 +1,7 @@
Include file for Performous man page
[name]
-performous \- The free Linux karaoke game
+performous \- The free karaoke game
[description]
Performous is a free cross-platform clone of the Playstation 2 game Singstar.
@@ -102,6 +102,11 @@ Modify options
\fBCtrl+S\fR
Save current configuration to configuration file
+[audio device configuration]
+Performous normally autodetects microphones and playback devices correctly, but if this fails on your machine, you will need to configure them from command line because in-game configuration is not yet implemented. Once you have them working, enter the configuration menu and press \fBCtrl+S\fR to save them to your config file so that they don't need to specified when starting the program.
+
+Additionally, the current version prints a list of ALSA devices detected to console. Use this as a reference for your configuration.
+
[see also]
You can find more information at http://performous.org/ or
http://sourceforge.net/projects/performous/
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-07-06 01:29:44
|
Module: performous
Branch: master
Commit: 65dcc05989d62f369c40b746b7730d26aa9701bd
Author: Lasse Karkkainen <tro...@tr...>
Date: Mon Jul 6 04:26:01 2009 +0300
Install the XSL files for songlist conversion.
---
data/CMakeLists.txt | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
index 80942d2..da43afc 100644
--- a/data/CMakeLists.txt
+++ b/data/CMakeLists.txt
@@ -3,8 +3,13 @@ set(PIXMAP_FILE "performous.xpm")
set(CONFIG_FILE "performous.xml")
if(UNIX)
- install(FILES "${APPLICATION_FILE}" DESTINATION "share/applications/")
- install(FILES "${PIXMAP_FILE}" DESTINATION "share/pixmaps")
+ install(FILES ${APPLICATION_FILE} DESTINATION "share/applications/")
+ install(FILES ${PIXMAP_FILE} DESTINATION "share/pixmaps")
+ install(FILES ${PIXMAP_FILE} DESTINATION "share/pixmaps")
endif(UNIX)
-install(FILES "${CONFIG_FILE}" DESTINATION "${CMAKE_INSTALL_PREFIX}/${SHARE_INSTALL}/config/")
+install(FILES ${CONFIG_FILE} DESTINATION "${CMAKE_INSTALL_PREFIX}/${SHARE_INSTALL}/config/")
+
+file(GLOB XSL_FILES "*.xsl")
+install(FILES ${XSL_FILES} DESTINATION "${CMAKE_INSTALL_PREFIX}/${SHARE_INSTALL}/xsl/")
+
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-07-06 01:29:43
|
Module: performous Branch: master Commit: aa2efeae9f8c8c127238a2c0ae2ff8729085da9a Author: Lasse Karkkainen <tro...@tr...> Date: Mon Jul 6 04:28:42 2009 +0300 Make source package generation ignore git files. --- cmake/performous-packaging.cmake | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/cmake/performous-packaging.cmake b/cmake/performous-packaging.cmake index 3c788dd..b4b38ac 100644 --- a/cmake/performous-packaging.cmake +++ b/cmake/performous-packaging.cmake @@ -4,9 +4,11 @@ set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A karaoke game with pitch detection and s set(CPACK_PACKAGE_CONTACT "http://performous.org/") set(CPACK_SOURCE_IGNORE_FILES "/.cvsignore" + "/.gitignore" "/songs/" "/build/" "/.svn/" + "/.git/" "/osx-utils/" "/portage-overlay/" ) |
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-07-06 01:29:33
|
Module: performous
Branch: master
Commit: fb6b2710fc53bc8dc02a42b4685f487fcff812ac
Author: Lasse Karkkainen <tro...@tr...>
Date: Mon Jul 6 03:17:35 2009 +0300
Init libda and read config only after commandline argument handling.
---
game/main.cc | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/game/main.cc b/game/main.cc
index 04b0b4c..fcf3ea2 100644
--- a/game/main.cc
+++ b/game/main.cc
@@ -173,13 +173,7 @@ int main(int argc, char** argv) {
std::signal(SIGINT, quit);
std::signal(SIGTERM, quit);
std::ios::sync_with_stdio(false); // We do not use C stdio
- da::initialize libda;
- try {
- readConfig();
- } catch (std::exception& e) {
- std::cerr << e.what() << std::endl;
- return EXIT_FAILURE;
- }
+ // Parse commandline options
std::vector<std::string> mics;
std::vector<std::string> pdevs;
std::vector<std::string> songdirs;
@@ -264,6 +258,15 @@ int main(int argc, char** argv) {
std::cout << PACKAGE << ' ' << VERSION << std::endl;
return 0;
}
+ // Initialize audio
+ da::initialize libda;
+ // Read config files
+ try {
+ readConfig();
+ } catch (std::exception& e) {
+ std::cerr << e.what() << std::endl;
+ return EXIT_FAILURE;
+ }
// Override XML config for options that were specified from commandline or performous.conf
if (vm.count("width")) config["graphic/window_width"].i() = vm["width"].as<int>();
if (vm.count("height")) config["graphic/window_height"].i() = vm["height"].as<int>();
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-07-05 20:00:30
|
Module: performous
Branch: master
Commit: 05363ae3dc0ee8a3bce8333896a4e7ab64db777a
Author: Lasse Karkkainen <tro...@tr...>
Date: Sun Jul 5 22:39:47 2009 +0300
Fix Practice note/freq printout.
---
game/screen_practice.cc | 17 +++++++++--------
1 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/game/screen_practice.cc b/game/screen_practice.cc
index bda601e..0c18939 100644
--- a/game/screen_practice.cc
+++ b/game/screen_practice.cc
@@ -58,16 +58,21 @@ void ScreenPractice::draw() {
}
void ScreenPractice::draw_analyzers() {
+ MusicalScale scale;
boost::ptr_vector<Analyzer>& analyzers = m_capture.analyzers();
if (analyzers.empty()) return;
- bool text = false;
+ double textPower = -getInf();
+ double textFreq = 0.0;
for (unsigned int i = 0; i < analyzers.size(); ++i) {
Analyzer& analyzer = analyzers[i];
analyzer.process();
Tone const* tone = analyzer.findTone();
double freq = (tone ? tone->freq : 0.0);
- MusicalScale scale;
+ if (tone && tone->db > textPower) {
+ textPower = tone->db;
+ textFreq = freq;
+ }
// getPeak returns 0.0 when clipping, negative values when not that loud.
// Normalizing to [0,1], where 0 is -43 dB or less (to match the vumeter graphic)
m_vumeters[i].draw(analyzer.getPeak() / 43.0 + 1.0);
@@ -94,12 +99,8 @@ void ScreenPractice::draw_analyzers() {
theme->sharp.draw();
}
}
-
- if (!text) {
- theme->note_txt.draw(scale.getNoteStr(freq));
- text = true;
- }
}
}
-
+ // Display note and frequency
+ if (textFreq > 0.0) theme->note_txt.draw(scale.getNoteStr(textFreq));
}
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-07-05 20:00:23
|
Module: performous Branch: master Commit: 7803dee44d213a96b7f4b1288330709485a15e03 Author: Lasse Karkkainen <tro...@tr...> Date: Sun Jul 5 22:22:52 2009 +0300 Version number 0.3.1. --- CMakeLists.txt | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 578ee8a..1dc2046 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ project(Performous CXX) cmake_minimum_required(VERSION 2.4) -set(PROJECT_VERSION "0.3.0+") +set(PROJECT_VERSION "0.3.1") # Avoid source tree pollution if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR) |
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-07-05 19:17:56
|
Module: performous
Branch: master
Commit: bc8737bd6a192e5542538f02a04d22de874adf61
Author: Lasse Karkkainen <tro...@tr...>
Date: Sun Jul 5 21:52:46 2009 +0300
Remove debug.
---
game/progressbar.cc | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/game/progressbar.cc b/game/progressbar.cc
index f6a45f4..3a1a0a8 100644
--- a/game/progressbar.cc
+++ b/game/progressbar.cc
@@ -29,7 +29,6 @@ void ProgressBar::draw(float value) {
TexCoords tex;
if (m_sliding) { dim.move(0.0f, off * dim.h()); tex.y2 = 1.0f - m_begin - off; }
else { tex.y2 = 1.0f - m_begin; tex.y1 = tex.y2 - value * scale; }
- std::cout << dim.y1() << std::endl;
m_bar.drawCropped(dim, tex);
}
break;
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-07-05 19:17:55
|
Module: performous
Branch: master
Commit: b04863b089bd21dcd7eabf3d883a62f7df6e119d
Author: Lasse Karkkainen <tro...@tr...>
Date: Sun Jul 5 21:49:19 2009 +0300
Do not seek to negative positions (that causes long delays).
---
game/video.cc | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/game/video.cc b/game/video.cc
index afe848e..c4acbd8 100644
--- a/game/video.cc
+++ b/game/video.cc
@@ -25,7 +25,7 @@ void Video::render(double time) {
if (fr.data.empty()) while (m_mpeg.videoQueue.tryPop(fr) && fr.timestamp < time) {};
// Do a seek before next render, if required
if (time < m_lastTime - 1.0 || (!fr.data.empty() && time > fr.timestamp + 7.0)) {
- m_mpeg.seek(time - 5.0); // -5 to workaround ffmpeg inaccurate seeking
+ m_mpeg.seek(std::max(0.0, time - 5.0)); // -5 to workaround ffmpeg inaccurate seeking
fr.data.clear();
}
m_lastTime = time;
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-07-05 17:44:00
|
Module: performous
Branch: master
Commit: d71590998afdb63e9f93148316f649ed94e5208e
Author: Lasse Karkkainen <tro...@tr...>
Date: Sun Jul 5 20:41:05 2009 +0300
Make jukebox mode reload the song at end of song even if the next song is the same as the current one (if there is only one song or if the next song uses the same MP3).
Fix video latency compensation in song selector by changing the interface so that videogap is passed to Video constructor.
Adjust video seeking parameters to better workaround ffmpeg seeking issues.
Make video use AnimValue for its alpha blending (smoother and more reliable now).
---
game/audio.cc | 11 +++++++++--
game/audio.hh | 2 ++
game/screen_sing.cc | 4 ++--
game/screen_songs.cc | 12 +++++++++---
game/video.cc | 18 +++++++++---------
game/video.hh | 11 +++++------
6 files changed, 36 insertions(+), 22 deletions(-)
diff --git a/game/audio.cc b/game/audio.cc
index 42f0b05..09aa93f 100644
--- a/game/audio.cc
+++ b/game/audio.cc
@@ -118,11 +118,18 @@ void Audio::playSample(std::string filename) {
}
}
-void Audio::seek(double seek_dist) {
+void Audio::seek(double offset) {
boost::recursive_mutex::scoped_lock l(m_mutex);
if (m_streams.empty()) return;
Stream& s = m_streams.back();
- int position = clamp(s.mpeg.position() + seek_dist, 0.0, s.mpeg.duration() - 1.0);
+ seekPos(s.mpeg.position() + offset);
+}
+
+void Audio::seekPos(double pos) {
+ boost::recursive_mutex::scoped_lock l(m_mutex);
+ if (m_streams.empty()) return;
+ Stream& s = m_streams.back();
+ int position = clamp(pos, 0.0, s.mpeg.duration() - 1.0);
s.mpeg.seek(position);
s.prebuffering = true;
m_paused = false;
diff --git a/game/audio.hh b/game/audio.hh
index b63d2a8..ba3d2af 100644
--- a/game/audio.hh
+++ b/game/audio.hh
@@ -139,6 +139,8 @@ class Audio {
* @param seek_dist number of seconds to seek from current position
*/
void seek(double seek_dist);
+ /** Seek to specific time **/
+ void seekPos(double pos);
/** Is the music playing (loaded and not at EOF yet, pause doesn't matter) **/
bool isPlaying() const;
/** Get the current position. If not known or nothing is playing, NaN is returned. **/
diff --git a/game/screen_sing.cc b/game/screen_sing.cc
index 936a3ba..c2a6b01 100644
--- a/game/screen_sing.cc
+++ b/game/screen_sing.cc
@@ -25,7 +25,7 @@ void ScreenSing::enter() {
std::cerr << e.what() << std::endl;
}
}
- if (!song.video.empty() && config["graphic/video"].b()) m_video.reset(new Video(song.path + song.video));
+ if (!song.video.empty() && config["graphic/video"].b()) m_video.reset(new Video(song.path + song.video, song.videoGap));
m_pause_icon.reset(new Surface(getThemePath("sing_pause.svg")));
m_score_text[0].reset(new SvgTxtThemeSimple(getThemePath("sing_score_text.svg"), config["graphic/text_lod"].f()));
m_score_text[1].reset(new SvgTxtThemeSimple(getThemePath("sing_score_text.svg"), config["graphic/text_lod"].f()));
@@ -131,7 +131,7 @@ void ScreenSing::draw() {
if (ar > arMax || (m_video && ar > arMin)) fillBG(); // Fill white background to avoid black borders
m_background->draw();
} else fillBG();
- if (m_video) { m_video->render(time + song.videoGap); double tmp = m_video->dimensions().ar(); if (tmp > 0.0) ar = tmp; }
+ if (m_video) { m_video->render(time); double tmp = m_video->dimensions().ar(); if (tmp > 0.0) ar = tmp; }
ar = clamp(ar, arMin, arMax);
double offset = 0.5 / ar + 0.2;
theme->bg_bottom.dimensions.fixedWidth(1.0).bottom(offset);
diff --git a/game/screen_songs.cc b/game/screen_songs.cc
index 0800ccb..aac50e1 100644
--- a/game/screen_songs.cc
+++ b/game/screen_songs.cc
@@ -101,6 +101,7 @@ void ScreenSongs::draw() {
if (m_video.get()) m_video->render(time);
if (!m_jukebox) theme->bg.draw();
std::string music, songbg, video;
+ double videoGap = 0.0;
std::ostringstream oss_song, oss_order;
// Test if there are no songs
if (m_songs.empty()) {
@@ -143,7 +144,7 @@ void ScreenSongs::draw() {
}
if (!song.mp3.empty()) music = song.path + song.mp3;
if (!song.background.empty()) songbg = song.path + song.background;
- if (!song.video.empty()) video = song.path + song.video;
+ if (!song.video.empty()) { video = song.path + song.video; videoGap = song.videoGap; }
}
if (m_jukebox) drawJukebox();
else {
@@ -158,11 +159,16 @@ void ScreenSongs::draw() {
m_songbg.reset(); m_video.reset();
if (music.empty()) m_audio.fadeout(); else m_audio.playPreview(music, m_jukebox ? 0.0 : 30.0);
if (!songbg.empty()) try { m_songbg.reset(new Surface(songbg)); } catch (std::exception const&) {}
- if (!video.empty() && config["graphic/video"].b()) m_video.reset(new Video(video));
+ if (!video.empty() && config["graphic/video"].b()) m_video.reset(new Video(video, videoGap));
m_playing = music;
}
if (m_jukebox) {
- if (!m_audio.isPlaying() || m_audio.getPosition() + 1.4 > m_audio.getLength()) m_songs.advance(1); // Switch if at song end
+ // Switch if at song end
+ if (!m_audio.isPlaying() || m_audio.getPosition() + 1.4 > m_audio.getLength()) {
+ m_songs.advance(1);
+ // Force reload of data
+ m_playing.clear();
+ }
} else if (!m_audio.isPaused() && m_playTimer.get() > IDLE_TIMEOUT) { // Switch if song hasn't changed for IDLE_TIMEOUT seconds
if (!m_search.text.empty()) { m_search.text.clear(); m_songs.setFilter(m_search.text); }
m_songs.random();
diff --git a/game/video.cc b/game/video.cc
index 44570aa..afe848e 100644
--- a/game/video.cc
+++ b/game/video.cc
@@ -2,9 +2,10 @@
#include "configuration.hh"
#include <cmath>
-Video::Video(std::string const& _videoFile): m_mpeg(true, false, _videoFile), m_surfaceTime(), m_lastTime(), m_alpha() {}
+Video::Video(std::string const& _videoFile, double videoGap): m_mpeg(true, false, _videoFile), m_videoGap(videoGap), m_surfaceTime(), m_lastTime(), m_alpha(-0.5, 1.5) {}
void Video::render(double time) {
+ time += m_videoGap;
VideoFrame& fr = m_videoFrame;
// Time to switch frame?
if (!fr.data.empty() && time >= fr.timestamp) {
@@ -13,19 +14,18 @@ void Video::render(double time) {
m_surfaceTime = fr.timestamp;
}
double tdist = std::abs(m_surfaceTime - time);
- m_alpha += (tdist < 0.4 ? 0.02f : -0.02f);
- if (m_alpha <= 0.0f) m_alpha = 0.0f;
- else {
- if (m_alpha > 1.2f) m_alpha = 1.2f;
- if (m_alpha < 1.0f) glColor4f(1.0f, 1.0f, 1.0f, m_alpha);
+ m_alpha.setTarget(tdist < 0.4 ? 1.2f : -0.5f);
+ float alpha = clamp(m_alpha.get());
+ if (alpha > 0.0f) {
+ if (alpha < 1.0f) glColor4f(1.0f, 1.0f, 1.0f, alpha);
m_surface.draw();
- glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
+ if (alpha < 1.0f) glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
}
// Preload the next future frame
if (fr.data.empty()) while (m_mpeg.videoQueue.tryPop(fr) && fr.timestamp < time) {};
// Do a seek before next render, if required
- if (time < m_lastTime - 0.4 || (!fr.data.empty() && time > fr.timestamp + 2.0)) {
- m_mpeg.seek(time - 0.3);
+ if (time < m_lastTime - 1.0 || (!fr.data.empty() && time > fr.timestamp + 7.0)) {
+ m_mpeg.seek(time - 5.0); // -5 to workaround ffmpeg inaccurate seeking
fr.data.clear();
}
m_lastTime = time;
diff --git a/game/video.hh b/game/video.hh
index 828ba99..c1ed3ea 100644
--- a/game/video.hh
+++ b/game/video.hh
@@ -1,6 +1,6 @@
-#ifndef PERFORMOUS_VIDEO_HH
-#define PERFORMOUS_VIDEO_HH
+#pragma once
+#include "animvalue.hh"
#include "surface.hh"
#include "ffmpeg.hh"
#include <string>
@@ -9,7 +9,7 @@
class Video {
public:
/// opens given video file
- Video(std::string const& videoFile);
+ Video(std::string const& videoFile, double videoGap = 0.0);
/// renders video
void render(double time);
/// returns Dimensions of video clip
@@ -19,12 +19,11 @@ class Video {
private:
FFmpeg m_mpeg;
+ double m_videoGap;
VideoFrame m_videoFrame;
Surface m_surface;
double m_surfaceTime;
double m_lastTime;
- float m_alpha;
+ AnimValue m_alpha;
};
-#endif
-
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-07-05 16:06:49
|
Module: performous Branch: master Commit: 7e05df33ca5675840bf3eebf31a8125ec5ade7ea Author: Lasse Karkkainen <tro...@tr...> Date: Sun Jul 5 19:06:19 2009 +0300 Merge branch 'master' of ssh://tronic@performous.git.sourceforge.net/gitroot/performous --- |
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-07-05 16:06:33
|
Module: performous
Branch: master
Commit: 00e5180b9cc5342b48372659f0882a736552bb88
Author: Lasse Karkkainen <tro...@tr...>
Date: Sun Jul 5 19:04:49 2009 +0300
Fixed songlist randomization bugs sometimes causing the list to not be randomized.
Moved the unsolvable ReleaseBlockers to TODO.
---
ReleaseBlockers.txt | 16 ----------------
docs/TODO.txt | 16 +++++++++++++++-
game/songs.cc | 25 ++++++++++++++++++-------
game/songs.hh | 3 ++-
4 files changed, 35 insertions(+), 25 deletions(-)
diff --git a/ReleaseBlockers.txt b/ReleaseBlockers.txt
deleted file mode 100644
index 7733d0c..0000000
--- a/ReleaseBlockers.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-Blockers for 0.3.1 release
-
-Entries ending with question mark are optional (and not really blockers).
-
-Device enumeration for libda
-- Display sensible options in config menu?
-
-Text rendering (all parts optional for this release)
-- Correct vertical alignment
-- Use dimensions to specify bounding box (possibly init from SVG)
-- Lyric hilighted should be rendered in front of the others
-
-New config menu
-- Multiple items visible at once
-- Modifying strings and stringlist items.
-
diff --git a/docs/TODO.txt b/docs/TODO.txt
index 66f6cd2..e1e0303 100644
--- a/docs/TODO.txt
+++ b/docs/TODO.txt
@@ -33,7 +33,21 @@ Features:
- Kiosk/arcade mode
-Ripper
+Text rendering bugs:
+
+- Correct vertical alignment
+- Use dimensions to specify bounding box (possibly init from SVG)
+- Lyric hilighted should be rendered in front of the others
+
+
+New config menu:
+
+- Multiple items visible at once
+- Modifying strings and stringlist items.
+- Predefined options from config schema and libda device enumeration
+
+
+Ripper:
- Compress into Vorbis Ogg and H.264 MKV
diff --git a/game/songs.cc b/game/songs.cc
index d28bf56..5bd4c42 100644
--- a/game/songs.cc
+++ b/game/songs.cc
@@ -15,7 +15,7 @@
#include <iterator>
#include <stdexcept>
-Songs::Songs(std::string const& songlist): m_songlist(songlist), math_cover(), m_order(), m_dirty(false), m_loading(false) {
+Songs::Songs(std::string const& songlist): m_songlist(songlist), math_cover(), m_order(), m_dirty(false), m_loading(false), m_needShuffle(false) {
reload();
}
@@ -31,6 +31,7 @@ void Songs::reload() {
m_songdirs.clear();
std::transform(sd.begin(), sd.end(), std::inserter(m_songdirs, m_songdirs.end()), pathMangle);
// Run loading thread
+ m_needShuffle = false;
m_loading = true;
m_thread.reset(new boost::thread(boost::bind(&Songs::reload_internal, boost::ref(*this))));
}
@@ -51,10 +52,11 @@ void Songs::reload_internal() {
}
if (m_loading) dumpSongs_internal(); // Dump the songlist to file (if requested)
m_loading = false;
- m_dirty = true; // Force shuffle
+ m_needShuffle = true; // Force shuffle
}
void Songs::reload_internal(fs::path const& parent) {
+ static int randomIdx = 0;
namespace fs = fs;
if (std::distance(parent.begin(), parent.end()) > 20) { std::cout << ">>> Not scanning: " << parent.string() << " (maximum depth reached, possibly due to cyclic symlinks)" << std::endl; return; }
try {
@@ -69,7 +71,7 @@ void Songs::reload_internal(fs::path const& parent) {
if (name.size() < 5 || !regex_match(name.substr(name.size() - 4).c_str(),match,expression)) continue;
try {
Song* s = new Song(path, name);
- s->randomIdx = std::numeric_limits<int>::min();
+ s->randomIdx = ++randomIdx; // Not so random during loading, they are shuffled after load is finished
boost::mutex::scoped_lock l(m_mutex);
m_songs.push_back(boost::shared_ptr<Song>(s));
m_dirty = true;
@@ -111,6 +113,16 @@ class Songs::RestoreSel {
}
};
+void Songs::update() {
+ if (m_dirty) filter_internal();
+ // Shuffle the songlist if shuffle is finished and all songs are already filtered
+ if (m_needShuffle && !m_dirty) {
+ randomize_internal();
+ math_cover.setTarget(0, m_songs.size());
+ m_needShuffle = false;
+ }
+}
+
void Songs::randomize() {
RestoreSel restore(*this);
randomize_internal();
@@ -124,8 +136,9 @@ void Songs::randomize_internal() {
for (SongVector::const_iterator it = m_filtered.begin(); it != m_filtered.end(); ++it) (*it)->randomIdx = gen();
*/
std::srand(std::time(NULL));
+ // Assign the songs randomIdx that is used for sorting in the "random" mode
for (SongVector::const_iterator it = m_filtered.begin(); it != m_filtered.end(); ++it) (*it)->randomIdx = std::rand();
- m_order = 0;
+ m_order = 0; // Use randomIdx sort mode
sort_internal();
}
@@ -137,6 +150,7 @@ void Songs::setFilter(std::string const& val) {
void Songs::filter_internal() {
boost::mutex::scoped_lock l(m_mutex);
+ m_dirty = false;
RestoreSel restore(*this);
try {
SongVector filtered;
@@ -149,11 +163,8 @@ void Songs::filter_internal() {
}
math_cover.reset();
sort_internal();
- if (m_dirty && !m_loading) { randomize_internal(); math_cover.setTarget(0, m_songs.size()); }
- m_dirty = false;
}
-
namespace {
/// A functor that compares songs based on a selected member field of them.
diff --git a/game/songs.hh b/game/songs.hh
index ae7c4f8..69902d1 100644
--- a/game/songs.hh
+++ b/game/songs.hh
@@ -17,7 +17,7 @@ class Songs: boost::noncopyable {
Songs(std::string const& songlist = std::string());
~Songs();
/// updates filtered songlist
- void update() { if (m_dirty) filter_internal(); }
+ void update();
/// reloads songlist
void reload();
/// array access
@@ -77,6 +77,7 @@ class Songs: boost::noncopyable {
void sort_internal();
volatile bool m_dirty;
volatile bool m_loading;
+ volatile bool m_needShuffle;
boost::scoped_ptr<boost::thread> m_thread;
mutable boost::mutex m_mutex;
};
|
|
From: Yoda-JM <yo...@us...> - 2009-07-05 11:01:18
|
Module: performous
Branch: master
Commit: 4ebc892d98f43dc60981d6783aeb9567e75f0959
Author: Vincent Le Ligeour <yo...@us...>
Date: Sun Jul 5 13:00:50 2009 +0200
Fixed some jukebox key management again
---
game/screen_songs.cc | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/game/screen_songs.cc b/game/screen_songs.cc
index a87f1c0..0800ccb 100644
--- a/game/screen_songs.cc
+++ b/game/screen_songs.cc
@@ -43,6 +43,10 @@ void ScreenSongs::manageEvent(SDL_Event event) {
if (key == SDLK_ESCAPE || m_songs.empty()) m_jukebox = false;
else if (key == SDLK_SPACE || (key == SDLK_PAUSE || (key == SDLK_p && mod && KMOD_CTRL))) m_audio.togglePause();
else if (key == SDLK_RETURN) sm->activateScreen("Sing");
+ else if (key == SDLK_LEFT) m_songs.advance(-1);
+ else if (key == SDLK_RIGHT) m_songs.advance(1);
+ else if (key == SDLK_PAGEUP) m_audio.seek(-30);
+ else if (key == SDLK_PAGEDOWN) m_audio.seek(30);
else if (key == SDLK_UP) m_audio.seek(5);
else if (key == SDLK_DOWN) m_audio.seek(-5);
return;
|
|
From: Yoda-JM <yo...@us...> - 2009-07-05 10:19:49
|
Module: performous
Branch: master
Commit: a824ae19d2b4ddc195e0dbe6ef47e00d1047fdc6
Author: Vincent Le Ligeour <yo...@us...>
Date: Sun Jul 5 12:17:26 2009 +0200
Fixed juckbox mode key management
---
game/screen_songs.cc | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/game/screen_songs.cc b/game/screen_songs.cc
index 3f99c37..a87f1c0 100644
--- a/game/screen_songs.cc
+++ b/game/screen_songs.cc
@@ -40,10 +40,12 @@ void ScreenSongs::manageEvent(SDL_Event event) {
int key = keysym.sym;
SDLMod mod = event.key.keysym.mod;
if (m_jukebox) {
- if (key == SDLK_ESCAPE || m_songs.empty()) { m_jukebox = false; return; }
- if (key == SDLK_RETURN) sm->activateScreen("Sing");
- if (key == SDLK_UP) m_audio.seek(5);
- if (key == SDLK_DOWN) m_audio.seek(-5);
+ if (key == SDLK_ESCAPE || m_songs.empty()) m_jukebox = false;
+ else if (key == SDLK_SPACE || (key == SDLK_PAUSE || (key == SDLK_p && mod && KMOD_CTRL))) m_audio.togglePause();
+ else if (key == SDLK_RETURN) sm->activateScreen("Sing");
+ else if (key == SDLK_UP) m_audio.seek(5);
+ else if (key == SDLK_DOWN) m_audio.seek(-5);
+ return;
}
if (key == SDLK_r && mod & KMOD_CTRL) { m_songs.reload(); m_songs.setFilter(m_search.text); }
if (!m_jukebox && m_search.process(keysym)) m_songs.setFilter(m_search.text);
|
|
From: Yoda-JM <yo...@us...> - 2009-07-05 01:36:02
|
Module: performous
Branch: master
Commit: 60264bf72c602c4ef6d0c377631fb6a9025a8364
Author: Vincent Le Ligeour <yo...@us...>
Date: Sun Jul 5 03:35:22 2009 +0200
Updated ebuild to use new songs packages
---
.../games-arcade/performous/performous-9999.ebuild | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/portage-overlay/games-arcade/performous/performous-9999.ebuild b/portage-overlay/games-arcade/performous/performous-9999.ebuild
index 154165c..491960c 100644
--- a/portage-overlay/games-arcade/performous/performous-9999.ebuild
+++ b/portage-overlay/games-arcade/performous/performous-9999.ebuild
@@ -7,11 +7,15 @@ inherit games git cmake-utils
RESTRICT="nostrip"
SONGS_PN=ultrastar-songs
-SONGS_P=${SONGS_PN}-2
DESCRIPTION="Karaoke game similar to Singstar"
HOMEPAGE="http://performous.org"
-SRC_URI="songs? ( mirror://sourceforge/${PN}/${SONGS_P}.tar.bz2 )"
+SRC_URI="songs? (
+ mirror://sourceforge/${PN}/${SONGS_PN}-jc-1.zip
+ mirror://sourceforge/${PN}/${SONGS_PN}-libre-3.zip
+ mirror://sourceforge/${PN}/${SONGS_PN}-restricted-3.zip
+ mirror://sourceforge/${PN}/${SONGS_PN}-shearer-1.zip
+ )"
EGIT_REPO_URI="git://performous.git.sourceforge.net/gitroot/performous"
@@ -57,7 +61,10 @@ src_unpack() {
git_src_unpack
if use songs; then
cd "${S}"
- unpack "${SONGS_P}.tar.bz2"
+ unpack "${SONGS_PN}-jc-1.zip"
+ unpack "${SONGS_PN}-libre-3.zip"
+ unpack "${SONGS_PN}-restricted-3.zip"
+ unpack "${SONGS_PN}-shearer-1.zip"
pwd
fi
}
|