Git-Url:
http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=ba2c46c90d8150bc36d9f88ff0f872043274be04
commit ba2c46c90d8150bc36d9f88ff0f872043274be04
Author: Priyank <[EMAIL PROTECTED]>
Date: Thu Sep 27 00:28:47 2007 +0530
wxmusik-0.4.2.2-4-i686
* Rebuild against new flac, libmpcdec (Closes #2448)
* Fdesktop->Fdesktop2
* Added three new patches to fix player controls
* Added a patch to fix compilation with flac-1.2
diff --git a/source/xmultimedia-extra/wxmusik/FLAC13.diff
b/source/xmultimedia-extra/wxmusik/FLAC13.diff
new file mode 100644
index 0000000..3661709
--- /dev/null
+++ b/source/xmultimedia-extra/wxmusik/FLAC13.diff
@@ -0,0 +1,234 @@
+--- wxMusik-0.4.2.2/MUSIKEngine/MUSIKEngine/src/flacdecoder.h 2005-11-21
20:43:47.000000000 +0100
++++ wxMusik-0.4.2.2.new/MUSIKEngine/MUSIKEngine/src/flacdecoder.h
2007-04-11 16:31:44.000000000 +0200
+@@ -27,7 +27,7 @@
+ #define FLACDECODER_H
+
+ #include <FLAC/format.h>
+-#include <FLAC/file_decoder.h>
++#include <FLAC/stream_decoder.h>
+ #include <plugin_common/defs.h>
+ extern "C"
+ {
+@@ -62,7 +62,7 @@ class MUSIKFLACDecoder :public MUSIKDeco
+ } output_config_t;
+ struct FLACStreamInfo
+ {
+- FLAC__FileDecoder
*Decoder;
++ FLAC__StreamDecoder
*Decoder;
+ FLAC__StreamMetadata_StreamInfo streaminfo; /*
FLAC: metadata infos */
+ FLAC__uint64
pos_sample; /* FLAC: position is sample */
+ bool
flac_abort; /* FLAC: abort flac when an error occured */
+@@ -117,24 +117,24 @@ protected:
+ int DecodeBlocks(unsigned char *buff,int len);
+ bool DoSeek(int nTimeMS);
+
+- static FLAC__StreamDecoderWriteStatus FLACWriteCallback(const
FLAC__FileDecoder *decoder,
++ static FLAC__StreamDecoderWriteStatus FLACWriteCallback(const
FLAC__StreamDecoder *decoder,
+ const FLAC__Frame *frame,
+ const FLAC__int32 * const buffer[], void *client_data);
+- static void FLACMetaCallback(const FLAC__FileDecoder *decoder, const
FLAC__StreamMetadata *metadata, void *client_data);
+- static void FLACErrorCallback(const FLAC__FileDecoder *decoder,
FLAC__StreamDecoderErrorStatus status, void *client_data);
++ static void FLACMetaCallback(const FLAC__StreamDecoder *decoder, const
FLAC__StreamMetadata *metadata, void *client_data);
++ static void FLACErrorCallback(const FLAC__StreamDecoder *decoder,
FLAC__StreamDecoderErrorStatus status, void *client_data);
+
+ private:
+ void safe_decoder_finish_()
+ {
+- if(m_FlacInfo.Decoder &&
FLAC__file_decoder_get_state(m_FlacInfo.Decoder) !=
FLAC__FILE_DECODER_UNINITIALIZED)
+- FLAC__file_decoder_finish(m_FlacInfo.Decoder );
++ if(m_FlacInfo.Decoder &&
FLAC__stream_decoder_get_state(m_FlacInfo.Decoder) !=
FLAC__STREAM_DECODER_UNINITIALIZED)
++ FLAC__stream_decoder_finish(m_FlacInfo.Decoder );
+ }
+
+ void safe_decoder_delete_()
+ {
+ if(m_FlacInfo.Decoder ) {
+ safe_decoder_finish_();
+- FLAC__file_decoder_delete(m_FlacInfo.Decoder );
++ FLAC__stream_decoder_delete(m_FlacInfo.Decoder );
+ }
+ m_FlacInfo.Decoder = NULL;
+ }
+--- wxMusik-0.4.2.2/MUSIKEngine/MUSIKEngine/src/flacdecoder.cpp
2005-11-21 20:43:47.000000000 +0100
++++ wxMusik-0.4.2.2.new/MUSIKEngine/MUSIKEngine/src/flacdecoder.cpp
2007-04-11 16:43:48.000000000 +0200
+@@ -51,21 +51,21 @@ bool MUSIKFLACDecoder::OpenMedia(const c
+ m_FlacInfo.pos_sample =0;
+ m_FlacInfo.flac_abort = false;
+ m_Info.LengthMS = 0;
+- FLAC__FileDecoder *decoder = FLAC__file_decoder_new();
++
++ FLAC__StreamDecoder *decoder = FLAC__stream_decoder_new();
+ m_FlacInfo.Decoder = decoder;
+- FLAC__file_decoder_set_client_data(decoder,(void *)&m_FlacInfo);
+- FLAC__file_decoder_set_md5_checking(decoder, false);
+- FLAC__file_decoder_set_filename(decoder, FileName);
+- FLAC__file_decoder_set_metadata_ignore_all(decoder);
+- FLAC__file_decoder_set_metadata_respond(decoder,
FLAC__METADATA_TYPE_STREAMINFO);
+- FLAC__file_decoder_set_metadata_respond(decoder,
FLAC__METADATA_TYPE_VORBIS_COMMENT);
+- FLAC__file_decoder_set_metadata_callback(decoder, FLACMetaCallback);
+- FLAC__file_decoder_set_write_callback(decoder, FLACWriteCallback);
+- FLAC__file_decoder_set_error_callback(decoder,FLACErrorCallback);
+- FLAC__FileDecoderState nRetVal = FLAC__file_decoder_init(decoder);
+- if (nRetVal == FLAC__FILE_DECODER_OK)
++ FLAC__stream_decoder_set_md5_checking(decoder, false);
++ FLAC__stream_decoder_set_metadata_ignore_all(decoder);
++ FLAC__stream_decoder_set_metadata_respond(decoder,
FLAC__METADATA_TYPE_STREAMINFO);
++ FLAC__stream_decoder_set_metadata_respond(decoder,
FLAC__METADATA_TYPE_VORBIS_COMMENT);
++
++ FLAC__StreamDecoderInitStatus nRetVal =
FLAC__stream_decoder_init_file(decoder,
++ FileName, FLACWriteCallback, FLACMetaCallback, FLACErrorCallback,
++ &m_FlacInfo);
++
++ if (nRetVal == FLAC__STREAM_DECODER_INIT_STATUS_OK)
+ {
+- FLAC__file_decoder_process_until_end_of_metadata(decoder);
++ FLAC__stream_decoder_process_until_end_of_metadata(decoder);
+
+ int decoder_buffer_size = (FLAC_SAMPLES_PER_WRITE *
m_FlacInfo.streaminfo.channels * m_FlacInfo.streaminfo.bits_per_sample)*4;
+ /* convert from samples to ms */
+@@ -99,11 +99,11 @@ int MUSIKFLACDecoder::DecodeBlocks(unsig
+
+ while(m_FlacInfo.wide_samples_in_reservoir_ < FLAC_SAMPLES_PER_WRITE)
+ {
+- if(FLAC__file_decoder_get_state(m_FlacInfo.Decoder) ==
FLAC__FILE_DECODER_END_OF_FILE) {
++ if(FLAC__stream_decoder_get_state(m_FlacInfo.Decoder) ==
FLAC__STREAM_DECODER_END_OF_STREAM) {
+ return 0;
+ }
+- else if(!FLAC__file_decoder_process_single(m_FlacInfo.Decoder))
{
+- //show_error("Error while processing frame (%s).",
FLAC__FileDecoderStateString[FLAC__file_decoder_get_state(m_FlacInfo.Decoder)]);
++ else
if(!FLAC__stream_decoder_process_single(m_FlacInfo.Decoder)) {
++ //show_error("Error while processing frame (%s).",
FLAC__StreamDecoderStateString[FLAC__stream_decoder_get_state(m_FlacInfo.Decoder)]);
+ return 0;
+ }
+ }
+@@ -163,7 +163,7 @@ int MUSIKFLACDecoder::DecodeBlocks(unsig
+ }
+ return 0;
+ }
+-FLAC__StreamDecoderWriteStatus MUSIKFLACDecoder::FLACWriteCallback(const
FLAC__FileDecoder *decoder,
++FLAC__StreamDecoderWriteStatus MUSIKFLACDecoder::FLACWriteCallback(const
FLAC__StreamDecoder *decoder,
+
const FLAC__Frame
*frame,
+
const FLAC__int32 *
const buffer[], void *client_data)
+ {
+@@ -182,7 +182,7 @@ FLAC__StreamDecoderWriteStatus MUSIKFLAC
+ return FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE;
+ }
+
+-void MUSIKFLACDecoder::FLACMetaCallback(const FLAC__FileDecoder *decoder,
const FLAC__StreamMetadata *metadata, void *client_data)
++void MUSIKFLACDecoder::FLACMetaCallback(const FLAC__StreamDecoder *decoder,
const FLAC__StreamMetadata *metadata, void *client_data)
+ {
+ /* TO-DO: Meta data */
+ FLACStreamInfo *pFlacInfo=(FLACStreamInfo *)client_data;
+@@ -205,7 +205,7 @@ void MUSIKFLACDecoder::FLACMetaCallback(
+ }
+
+
+-void MUSIKFLACDecoder::FLACErrorCallback(const FLAC__FileDecoder *decoder,
FLAC__StreamDecoderErrorStatus status, void *client_data)
++void MUSIKFLACDecoder::FLACErrorCallback(const FLAC__StreamDecoder *decoder,
FLAC__StreamDecoderErrorStatus status, void *client_data)
+ {
+ /* TO-DO: Error handling */
+ FLACStreamInfo *pFlacInfo=(FLACStreamInfo *)client_data;
+@@ -223,7 +223,7 @@ bool MUSIKFLACDecoder::DoSeek(int nTimeM
+ int done = 0;
+ const double distance = (double)nTimeMS / (double)m_Info.LengthMS;
+ const unsigned target_sample = (unsigned)(distance *
(double)m_FlacInfo.streaminfo.total_samples);
+- if(FLAC__file_decoder_seek_absolute(m_FlacInfo.Decoder,
(FLAC__uint64)target_sample)) {
++ if(FLAC__stream_decoder_seek_absolute(m_FlacInfo.Decoder,
(FLAC__uint64)target_sample)) {
+ SetDecodePos(nTimeMS);
+ done = 0;
+ }
+@@ -233,7 +233,7 @@ bool MUSIKFLACDecoder::DoSeek(int nTimeM
+ bool MUSIKFLACDecoder::Close()
+ {
+ MUSIKDecoder::Close();
+- FLAC__file_decoder_delete(m_FlacInfo.Decoder);
++ FLAC__stream_decoder_delete(m_FlacInfo.Decoder);
+ return true;
+ }
+
+--- wxMusik-0.4.2.2/MUSIKEngine/3rd-Party/grabbag/replaygain.c 2005-11-21
20:43:46.000000000 +0100
++++ wxMusik-0.4.2.2.new/MUSIKEngine/3rd-Party/grabbag/replaygain.c
2007-04-11 16:50:55.000000000 +0200
+@@ -19,7 +19,7 @@
+ #include "share/grabbag.h"
+ #include "share/replaygain_analysis.h"
+ #include "FLAC/assert.h"
+-#include "FLAC/file_decoder.h"
++#include "FLAC/stream_decoder.h"
+ #include "FLAC/metadata.h"
+ #include <locale.h>
+ #include <math.h>
+@@ -266,7 +266,7 @@ typedef struct {
+ FLAC__bool error;
+ } DecoderInstance;
+
+-static FLAC__StreamDecoderWriteStatus write_callback_(const FLAC__FileDecoder
*decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void
*client_data)
++static FLAC__StreamDecoderWriteStatus write_callback_(const
FLAC__StreamDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 *
const buffer[], void *client_data)
+ {
+ DecoderInstance *instance = (DecoderInstance*)client_data;
+ const unsigned bits_per_sample = frame->header.bits_per_sample;
+@@ -295,7 +295,7 @@ static FLAC__StreamDecoderWriteStatus wr
+ return FLAC__STREAM_DECODER_WRITE_STATUS_ABORT;
+ }
+
+-static void metadata_callback_(const FLAC__FileDecoder *decoder, const
FLAC__StreamMetadata *metadata, void *client_data)
++static void metadata_callback_(const FLAC__StreamDecoder *decoder, const
FLAC__StreamMetadata *metadata, void *client_data)
+ {
+ DecoderInstance *instance = (DecoderInstance*)client_data;
+
+@@ -318,7 +318,7 @@ static void metadata_callback_(const FLA
+ }
+ }
+
+-static void error_callback_(const FLAC__FileDecoder *decoder,
FLAC__StreamDecoderErrorStatus status, void *client_data)
++static void error_callback_(const FLAC__StreamDecoder *decoder,
FLAC__StreamDecoderErrorStatus status, void *client_data)
+ {
+ DecoderInstance *instance = (DecoderInstance*)client_data;
+
+@@ -330,7 +330,7 @@ static void error_callback_(const FLAC__
+ const char *grabbag__replaygain_analyze_file(const char *filename, float
*title_gain, float *title_peak)
+ {
+ DecoderInstance instance;
+- FLAC__FileDecoder *decoder = FLAC__file_decoder_new();
++ FLAC__StreamDecoder *decoder = FLAC__stream_decoder_new();
+
+ if(0 == decoder)
+ return "memory allocation error";
+@@ -338,27 +338,23 @@ const char *grabbag__replaygain_analyze_
+ instance.error = false;
+
+ /* It does these three by default but lets be explicit: */
+- FLAC__file_decoder_set_md5_checking(decoder, false);
+- FLAC__file_decoder_set_metadata_ignore_all(decoder);
+- FLAC__file_decoder_set_metadata_respond(decoder,
FLAC__METADATA_TYPE_STREAMINFO);
+-
+- FLAC__file_decoder_set_filename(decoder, filename);
+- FLAC__file_decoder_set_write_callback(decoder, write_callback_);
+- FLAC__file_decoder_set_metadata_callback(decoder, metadata_callback_);
+- FLAC__file_decoder_set_error_callback(decoder, error_callback_);
+- FLAC__file_decoder_set_client_data(decoder, &instance);
+-
+- if(FLAC__file_decoder_init(decoder) != FLAC__FILE_DECODER_OK) {
+- FLAC__file_decoder_delete(decoder);
++ FLAC__stream_decoder_set_md5_checking(decoder, false);
++ FLAC__stream_decoder_set_metadata_ignore_all(decoder);
++ FLAC__stream_decoder_set_metadata_respond(decoder,
FLAC__METADATA_TYPE_STREAMINFO);
++
++ if(FLAC__stream_decoder_init_file(decoder, filename, write_callback_,
++ metadata_callback_, error_callback_, &instance)
++ != FLAC__STREAM_DECODER_INIT_STATUS_OK) {
++ FLAC__stream_decoder_delete(decoder);
+ return "initializing decoder";
+ }
+
+- if(!FLAC__file_decoder_process_until_end_of_file(decoder) ||
instance.error) {
+- FLAC__file_decoder_delete(decoder);
++ if(!FLAC__stream_decoder_process_until_end_of_stream(decoder) ||
instance.error) {
++ FLAC__stream_decoder_delete(decoder);
+ return "decoding file";
+ }
+
+- FLAC__file_decoder_delete(decoder);
++ FLAC__stream_decoder_delete(decoder);
+
+ grabbag__replaygain_get_title(title_gain, title_peak);
+
diff --git a/source/xmultimedia-extra/wxmusik/FrugalBuild
b/source/xmultimedia-extra/wxmusik/FrugalBuild
index f0b21b9..9c506a2 100644
--- a/source/xmultimedia-extra/wxmusik/FrugalBuild
+++ b/source/xmultimedia-extra/wxmusik/FrugalBuild
@@ -3,42 +3,51 @@
pkgname=wxmusik
pkgver=0.4.2.2
-pkgrel=3
+pkgrel=4
pkgdesc="An iTunes like music jukebox"
url="http://www.musik.berlios.de"
makedepends=('cmake' 'gzip')
depends=('glibc' 'fmod' 'flac' 'libmpcdec' 'sqlite2' \
- 'wxgtk' 'wxgtk-u8' 'mac')
+ 'wxgtk' 'wxgtk-u8' 'mac')
groups=('xmultimedia-extra')
archs=('i686' '!x86_64')
up2date="lynx -dump http://musik.berlios.de/ | grep -m1 Current | sed
's/.*Linux \(.*\).*/\1/'"
source=(http://download.berlios.de/musik/wxMusik-$pkgver.tar.bz2 \
- ActivityAreaCtrl.patch ActivityBox.patch \
- MusikDefines.patch MusikUtils.patch \
- OptionSelectionsPanel.patch PLFile.patch \
- PlaylistCtrl.patch)
+ ActivityAreaCtrl.patch \
+ ActivityBox.patch \
+ MusikDefines.patch \
+ MusikUtils.patch \
+ MusikFrame.patch \
+ MusikPlayer.patch \
+ OptionSelectionsPanel.patch \
+ PLFile.patch \
+ PlaylistCtrl.patch \
+ SourcesBox.patch \
+ FLAC13.diff)
options=('scriptlet')
+_F_desktop_name="WxMusik"
+_F_desktop_icon="musik.png"
+_F_desktop_categories="AudioVideo;Player;"
sha1sums=('d704f830be22717562986cd5c7a069449d401a24' \
- '8fe5408e1d4d08dda2e3acd98e7341b5539abe07' \
- '53cd8e9739c7ddb25386573d820273894b4f86fd' \
- '89386c562a8ee397ef9f8f9cee881ef44793e155' \
- 'aedfda29effce0304906002cf7336c7730929647' \
- 'c0ca555fdafc470328c2ada6989549f884d268e7' \
- '281a5e7684093feec1a426dd2bde43eff56e824d' \
- '4a5063d175006f80e5455f9a0c83e0d3634ac549')
+ '8fe5408e1d4d08dda2e3acd98e7341b5539abe07' \
+ '53cd8e9739c7ddb25386573d820273894b4f86fd' \
+ '89386c562a8ee397ef9f8f9cee881ef44793e155' \
+ 'aedfda29effce0304906002cf7336c7730929647' \
+ '2d2cac026a2cd558364dd8fd0afc9f23e5fc32c5' \
+ 'e1a6377d0a527146cb67d6abb5d4929834f52bec' \
+ 'c0ca555fdafc470328c2ada6989549f884d268e7' \
+ '281a5e7684093feec1a426dd2bde43eff56e824d' \
+ '4a5063d175006f80e5455f9a0c83e0d3634ac549' \
+ '9fc6b2727bd128fbd3fa55ce5a93d7bb614fd375' \
+ '818b1c762d28d214e3899486c9a28dab9bb71466')
+
build()
{
Fcd wxMusik-$pkgver
# Apply the patches
- patch -Np0 -i $Fsrcdir/ActivityAreaCtrl.patch || return 1
- patch -Np0 -i $Fsrcdir/ActivityBox.patch || return 1
- patch -Np0 -i $Fsrcdir/MusikDefines.patch || return 1
- patch -Np0 -i $Fsrcdir/MusikUtils.patch || return 1
- patch -Np0 -i $Fsrcdir/OptionSelectionsPanel.patch || return 1
- patch -Np0 -i $Fsrcdir/PLFile.patch || return 1
- patch -Np0 -i $Fsrcdir/PlaylistCtrl.patch || return 1
-
+ Fpatchall
+
# flags needed for building wxmusik
export CFLAGS="-w -O2 -fomit-frame-pointer -march=i686 -pipe
-I/usr/include/fmod"
export CXXFLAGS="-w -O2 -fomit-frame-pointer -march=i686 -pipe
-I/usr/include/fmod"
@@ -66,7 +75,9 @@ build()
Fln /usr/bin/wxMusik /usr/bin/wxmusik
# missing desktop file bug #852
- Fdesktop "/usr/bin/wxmusik" "/usr/share/wxMusik/data/musik.png"
"AudioVideo;Player;"
+ Fmkdir /usr/share/pixmaps
+ Fcp /usr/share/wxMusik/data/musik.png /usr/share/pixmaps/musik.png
+ Fdesktop2
}
# optimization OK
diff --git a/source/xmultimedia-extra/wxmusik/MusikFrame.patch
b/source/xmultimedia-extra/wxmusik/MusikFrame.patch
new file mode 100644
index 0000000..71e590e
--- /dev/null
+++ b/source/xmultimedia-extra/wxmusik/MusikFrame.patch
@@ -0,0 +1,24 @@
+--- src/Frames/MusikFrame.cpp.old 2005-11-22 03:43:39.000000000 +0800
++++ src/Frames/MusikFrame.cpp 2007-03-05 16:00:40.000000000 +0800
+@@ -380,9 +380,7 @@
+ g_SourcesCtrl->SetAlignment(wxLAYOUT_LEFT);
+ g_SourcesCtrl->SetOrientation(wxLAYOUT_VERTICAL);
+ g_SourcesCtrl->SetSashBorder(wxSASH_RIGHT, true);
+- g_SourcesCtrl->SetSashBorder(wxSASH_RIGHT, true);
+- g_SourcesCtrl->SetDefaultBorderSize(3);
+- g_SourcesCtrl->SetExtraBorderSize(1);
++ g_SourcesCtrl->SetDefaultBorderSize(5);
+ //---------------------//
+ //--- activity area ---//
+ //---------------------//
+@@ -392,8 +390,7 @@
+ g_ActivityAreaCtrl->SetAlignment(wxLAYOUT_TOP);
+ g_ActivityAreaCtrl->SetOrientation(wxLAYOUT_HORIZONTAL);
+ g_ActivityAreaCtrl->SetSashBorder(wxSASH_BOTTOM, true);
+- g_ActivityAreaCtrl->SetDefaultBorderSize(3);
+- g_ActivityAreaCtrl->SetExtraBorderSize(1);
++ g_ActivityAreaCtrl->SetDefaultBorderSize(5);
+
+
+
+
diff --git a/source/xmultimedia-extra/wxmusik/MusikPlayer.patch
b/source/xmultimedia-extra/wxmusik/MusikPlayer.patch
new file mode 100644
index 0000000..72953c9
--- /dev/null
+++ b/source/xmultimedia-extra/wxmusik/MusikPlayer.patch
@@ -0,0 +1,86 @@
+--- src/Classes/MusikPlayer.cpp.old 2005-11-22 03:43:38.000000000 +0800
++++ src/Classes/MusikPlayer.cpp 2006-09-12 03:00:09.000000000 +0800
+@@ -29,6 +29,7 @@
+ #include "MUSIKEngine/MUSIKEngine/inc/imusikstreamout.h"
+ //--- CMusikStreamArray ---//
+ #include <wx/arrimpl.cpp>
++#include <errno.h>
+ WX_DEFINE_OBJARRAY( CMusikStreamArray )
+
+
+@@ -39,6 +40,55 @@
+ return newbuffer;
+ }
+
++static CSongMetaData CurrentMetaData;
++
++static void UpdateLastFm(CMusikPlayer* player)
++{
++ static char* musikEnableLastfm = getenv("MUSIK_ENABLE_LASTFM");
++ if (musikEnableLastfm == NULL
++ || strlen(musikEnableLastfm) == 0
++ || atoi(musikEnableLastfm) <= 0)
++ {
++ return;
++ }
++ // Get max duration to determine if this music ends normally (ms)
++ int maxDuration = 0;
++ if (wxGetApp().Prefs.nFadeDuration > maxDuration) maxDuration =
wxGetApp().Prefs.nFadeDuration;
++ if (wxGetApp().Prefs.nFadeSeekDuration > maxDuration) maxDuration =
wxGetApp().Prefs.nFadeSeekDuration;
++ if (wxGetApp().Prefs.nFadePauseResumeDuration > maxDuration) maxDuration
= wxGetApp().Prefs.nFadePauseResumeDuration;
++ if (wxGetApp().Prefs.nFadeStopDuration > maxDuration) maxDuration =
wxGetApp().Prefs.nFadeStopDuration;
++ if (wxGetApp().Prefs.nFadeExitDuration > maxDuration) maxDuration =
wxGetApp().Prefs.nFadeExitDuration;
++ maxDuration += 10 * 1000;
++ // Skip manually-skipped or cancelled music
++ if (!player->IsPlaying() || player->GetTimeLeft(UNIT_MILLISEC) >
maxDuration)
++ return;
++ // Get temp file in lastfmsubmitd spool!
++ FILE* tmpfile = NULL;
++ char* tmpfname = tempnam("/var/spool/lastfm", "tmp");
++ tmpfile = fopen(tmpfname, "w");
++ if (! tmpfile)
++ {
++ printf("cannot open file \"%s\" for last.fm, error %d\n", tmpfname,
errno);
++ return;
++ }
++ // Get time
++ time_t local_time = time(NULL);
++ struct tm utc_tm;
++ gmtime_r(&local_time, &utc_tm);
++ // Write last.fm info!
++ CSongMetaData &metaData = CurrentMetaData;
++ fprintf(tmpfile, "---\n");
++ fprintf(tmpfile, "album: \"%s\"\n", (const char*) metaData.Album);
++ fprintf(tmpfile, "title: \"%s\"\n", (const char*) metaData.Title);
++ fprintf(tmpfile, "length: %d:%.2d\n",
++ (metaData.nDuration_ms / 1000) / 60,
++ (metaData.nDuration_ms / 1000) % 60);
++ fprintf(tmpfile, "artist: \"%s\"\n", (const char*) metaData.Artist);
++ fprintf(tmpfile, "time: !timestamp %d-%.2d-%.2d %.2d:%.2d:%.2d\n",
++ utc_tm.tm_year+1900, utc_tm.tm_mon+1, utc_tm.tm_mday,
++ utc_tm.tm_hour, utc_tm.tm_min, utc_tm.tm_sec);
++ fclose(tmpfile);
++}
+
+ BEGIN_EVENT_TABLE( CMusikPlayer, wxEvtHandler )
+ //---------------------------------------------------------//
+@@ -467,6 +517,11 @@
+ Stop();
+ return false;
+ }
++
++ if (CurrentMetaData.nDuration_ms > 0 && (m_Playlist[nItem] !=
m_CurrentSong))
++ UpdateLastFm( this );
++ CurrentMetaData = pNewSong->MetaData;
++
+ bool bSongChanged = (m_Playlist[nItem] != m_CurrentSong) && IsPlaying()
&& (nStartPos == 0);
+ if(bSongChanged )
+ {
+@@ -823,6 +878,7 @@
+ if(m_Stopping) return;
+ m_b_NETSTREAM_AbortConnect = true;
+ m_Stopping = true;
++ if (CurrentMetaData.nDuration_ms > 0) UpdateLastFm( this );
+ //-------------------------------------------------//
+ //--- set the fade type, let the thread worry ---//
+ //--- about cleaning any existing fades. ---//
diff --git a/source/xmultimedia-extra/wxmusik/SourcesBox.patch
b/source/xmultimedia-extra/wxmusik/SourcesBox.patch
new file mode 100644
index 0000000..feb23a2
--- /dev/null
+++ b/source/xmultimedia-extra/wxmusik/SourcesBox.patch
@@ -0,0 +1,24 @@
+--- src/Classes/SourcesBox.cpp.old 2005-11-22 03:43:38.000000000 +0800
++++ src/Classes/SourcesBox.cpp 2006-09-10 02:04:44.000000000 +0800
+@@ -953,7 +953,7 @@
+ #if defined(__WXMSW__) && !defined(USE_GENERICLISTCTRL)
+ SetColumnWidth ( main_col, nWidth );
+ #else
+- SetColumnWidth( main_col, nWidth -
wxSystemSettings::GetMetric(wxSYS_HSCROLL_Y) /*- GetColumnWidth( 0 )*/ - 1 );
++ SetColumnWidth( main_col, nWidth /*- GetColumnWidth( 0
)*/ - 1 );
+ #endif
+ }
+ }
+@@ -1592,10 +1592,10 @@
+ END_EVENT_TABLE()
+
+ CSourcesBox::CSourcesBox( wxWindow *parent )
+- : wxSashLayoutWindow( parent, MUSIK_SOURCES, wxDefaultPosition ,
wxDefaultSize, wxNO_BORDER | wxCLIP_CHILDREN |wxSW_3D|wxTAB_TRAVERSAL )
++ : wxSashLayoutWindow( parent, MUSIK_SOURCES, wxDefaultPosition ,
wxDefaultSize, wxNO_BORDER | wxCLIP_CHILDREN |wxSW_3DSASH|wxTAB_TRAVERSAL )
+ {
+
+- m_pPanel = new wxPanel( this, -1, wxDefaultPosition , wxDefaultSize ,
wxNO_BORDER|wxCLIP_CHILDREN|wxTAB_TRAVERSAL );
++ m_pPanel = new wxPanel( this, -1, wxDefaultPosition , wxDefaultSize ,
wxSUNKEN_BORDER|wxCLIP_CHILDREN|wxTAB_TRAVERSAL );
+ //--- CSourcesListBox ---//
+ m_pListBox = new CSourcesListBox( m_pPanel );
+ m_pPictureBox = new CPictureBox(m_pPanel);
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git