FreeBSD Bugzilla – Attachment 158905 Details for
Bug 201645
[MAINTAINER] Fix shuffle playback with audio/ncmpcpp
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
svn patch to fix random playback with audio/ncmpcpp
ncmpcpp.diff (text/plain), 2.49 KB, created by
yamagi
on 2015-07-17 07:25:45 UTC
(
hide
)
Description:
svn patch to fix random playback with audio/ncmpcpp
Filename:
MIME Type:
Creator:
yamagi
Created:
2015-07-17 07:25:45 UTC
Size:
2.49 KB
patch
obsolete
>Index: Makefile >=================================================================== >--- Makefile (Revision 392122) >+++ Makefile (Arbeitskopie) >@@ -2,6 +2,7 @@ > > PORTNAME= ncmpcpp > PORTVERSION= 0.6.5 >+PORTREVISION= 1 > CATEGORIES= audio > MASTER_SITES= http://ncmpcpp.rybczak.net/stable/ > >Index: files/patch-src_mpdpp.cpp >=================================================================== >--- files/patch-src_mpdpp.cpp (Revision 0) >+++ files/patch-src_mpdpp.cpp (Arbeitskopie) >@@ -0,0 +1,29 @@ >+--- src/mpdpp.cpp.orig 2015-07-05 02:18:34 UTC >++++ src/mpdpp.cpp >+@@ -38,6 +38,8 @@ Connection::Connection() : m_connection( >+ m_port(6600), >+ m_timeout(15) >+ { >++ std::random_device rd; >++ m_gen.seed(rd()); >+ } >+ >+ Connection::~Connection() >+@@ -504,7 +506,7 @@ bool Connection::AddRandomTag(mpd_tag_ty >+ } >+ else >+ { >+- std::random_shuffle(tags.begin(), tags.end()); >++ std::shuffle(tags.begin(), tags.end(), m_gen); >+ auto it = tags.begin(); >+ for (size_t i = 0; i < number && it != tags.end(); ++i) >+ { >+@@ -544,7 +546,7 @@ bool Connection::AddRandomSongs(size_t n >+ } >+ else >+ { >+- std::random_shuffle(files.begin(), files.end()); >++ std::shuffle(files.begin(), files.end(), m_gen); >+ StartCommandsList(); >+ auto it = files.begin(); >+ for (size_t i = 0; i < number && it != files.end(); ++i, ++it) > >Eigenschaftsänderungen: files/patch-src_mpdpp.cpp >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-src_mpdpp.h >=================================================================== >--- files/patch-src_mpdpp.h (Revision 0) >+++ files/patch-src_mpdpp.h (Arbeitskopie) >@@ -0,0 +1,19 @@ >+--- src/mpdpp.h.orig 2015-07-05 02:18:34 UTC >++++ src/mpdpp.h >+@@ -23,6 +23,7 @@ >+ >+ #include <cassert> >+ #include <exception> >++#include <random> >+ #include <set> >+ #include <vector> >+ >+@@ -277,6 +278,8 @@ private: >+ std::string m_password; >+ >+ mpd_tag_type m_searched_field; >++ >++ std::mt19937 m_gen; >+ }; >+ >+ } > >Eigenschaftsänderungen: files/patch-src_mpdpp.h >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 201645
: 158905