rpms/kmid2/F-11 kmid-2.3.0-kde#240394.patch, NONE, 1.1 kmid2.spec, 1.10, 1.11
Kevin Kofler
kkofler at fedoraproject.org
Thu Jun 3 21:42:55 UTC 2010
Author: kkofler
Update of /cvs/pkgs/rpms/kmid2/F-11
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv7033/F-11
Modified Files:
kmid2.spec
Added Files:
kmid-2.3.0-kde#240394.patch
Log Message:
Sync from devel:
* Thu Jun 03 2010 Kevin Kofler <Kevin at tigcc.ticalc.org> - 2.3.0-2
- Fix crash in ALSA backend due to reloadDeviceList (kde#240394, upstream patch)
kmid-2.3.0-kde#240394.patch:
alsamidiobject.cpp | 156 ++++++++++++++++++++++++++---------------------------
1 file changed, 77 insertions(+), 79 deletions(-)
--- NEW FILE kmid-2.3.0-kde#240394.patch ---
Index: alsa/alsamidiobject.cpp
===================================================================
--- alsa/alsamidiobject.cpp (revision 1134128)
+++ alsa/alsamidiobject.cpp (revision 1134129)
@@ -176,88 +176,86 @@
void ALSAMIDIObject::handleSequencerEvent(SequencerEvent* ev)
{
- if (SequencerEvent::isConnectionChange(ev))
- d->m_out->reloadDeviceList();
- else
- if (d->m_state == PlayingState)
- switch(ev->getSequencerType()) {
- case SND_SEQ_EVENT_ECHO:
- emit tick(ev->getTick());
- break;
- case SND_SEQ_EVENT_USR8:
- emit beat(ev->getRaw32(0), ev->getRaw8(4), ev->getRaw8(5));
- break;
- case SND_SEQ_EVENT_TIMESIGN:
- emit timeSignatureChanged(ev->getRaw8(0), ::pow(2, ev->getRaw8(1)));
- break;
- case SND_SEQ_EVENT_TEMPO: {
- qreal rtempo = 0.0;
- const TempoEvent* te = static_cast<const TempoEvent*>(ev);
- if (te != NULL) rtempo = 6e7 / te->getValue() * d->m_tempoFactor;
- emit tempoChanged(rtempo);
+ if ( !SequencerEvent::isConnectionChange(ev) &&
+ (d->m_state == PlayingState) )
+ switch(ev->getSequencerType()) {
+ case SND_SEQ_EVENT_ECHO:
+ emit tick(ev->getTick());
+ break;
+ case SND_SEQ_EVENT_USR8:
+ emit beat(ev->getRaw32(0), ev->getRaw8(4), ev->getRaw8(5));
+ break;
+ case SND_SEQ_EVENT_TIMESIGN:
+ emit timeSignatureChanged(ev->getRaw8(0), ::pow(2, ev->getRaw8(1)));
+ break;
+ case SND_SEQ_EVENT_TEMPO: {
+ qreal rtempo = 0.0;
+ const TempoEvent* te = static_cast<const TempoEvent*>(ev);
+ if (te != NULL) rtempo = 6e7 / te->getValue() * d->m_tempoFactor;
+ emit tempoChanged(rtempo);
+ }
+ break;
+ case SND_SEQ_EVENT_USR_VAR0: {
+ VariableEvent *ve = static_cast<VariableEvent*>(ev);
+ if (ve != NULL && ve->getData() != NULL && ve->getLength() > 0) {
+ QByteArray ba(ve->getData(), ve->getLength());
+ QString s;
+ if (d->m_codec == NULL)
+ s = QString::fromAscii(ba);
+ else
+ s = d->m_codec->toUnicode(ba);
+ s.remove(QRegExp("[/\\\\]+"));
+ s.remove(QRegExp("[\r\n]+"));
+ emit midiText(Song::Lyric, s);
}
- break;
- case SND_SEQ_EVENT_USR_VAR0: {
- VariableEvent *ve = static_cast<VariableEvent*>(ev);
- if (ve != NULL && ve->getData() != NULL && ve->getLength() > 0) {
- QByteArray ba(ve->getData(), ve->getLength());
- QString s;
- if (d->m_codec == NULL)
- s = QString::fromAscii(ba);
- else
- s = d->m_codec->toUnicode(ba);
- s.remove(QRegExp("[/\\\\]+"));
- s.remove(QRegExp("[\r\n]+"));
- emit midiText(Song::Lyric, s);
- }
- }
- break;
- case SND_SEQ_EVENT_NOTEOFF: {
- d->m_out->sendEvent(ev);
- const NoteOffEvent* n = static_cast<const NoteOffEvent*>(ev);
- emit midiNoteOff(n->getChannel(), n->getKey(), n->getVelocity());
- }
- break;
- case SND_SEQ_EVENT_NOTEON: {
- d->m_out->sendEvent(ev);
- const NoteOnEvent* n = static_cast<const NoteOnEvent*>(ev);
- emit midiNoteOn(n->getChannel(), n->getKey(), n->getVelocity());
- }
- break;
- case SND_SEQ_EVENT_KEYPRESS: {
- d->m_out->sendEvent(ev);
- const KeyPressEvent* n = static_cast<const KeyPressEvent*>(ev);
- emit midiKeyPressure(n->getChannel(), n->getKey(), n->getVelocity());
- }
- break;
- case SND_SEQ_EVENT_CONTROLLER:
- case SND_SEQ_EVENT_CONTROL14: {
- d->m_out->sendEvent(ev);
- const ControllerEvent* n = static_cast<const ControllerEvent*>(ev);
- emit midiController(n->getChannel(), n->getParam(), n->getValue());
- }
- break;
- case SND_SEQ_EVENT_PGMCHANGE: {
- d->m_out->sendEvent(ev);
- const ProgramChangeEvent* p = static_cast<const ProgramChangeEvent*>(ev);
- emit midiProgram(p->getChannel(), p->getValue());
- }
- break;
- case SND_SEQ_EVENT_CHANPRESS: {
- d->m_out->sendEvent(ev);
- const ChanPressEvent* n = static_cast<const ChanPressEvent*>(ev);
- emit midiChannelPressure(n->getChannel(), n->getValue());
- }
- break;
- case SND_SEQ_EVENT_PITCHBEND: {
- d->m_out->sendEvent(ev);
- const PitchBendEvent* n = static_cast<const PitchBendEvent*>(ev);
- emit midiPitchBend(n->getChannel(), n->getValue());
- }
- break;
- default:
+ }
+ break;
+ case SND_SEQ_EVENT_NOTEOFF: {
d->m_out->sendEvent(ev);
+ const NoteOffEvent* n = static_cast<const NoteOffEvent*>(ev);
+ emit midiNoteOff(n->getChannel(), n->getKey(), n->getVelocity());
}
+ break;
+ case SND_SEQ_EVENT_NOTEON: {
+ d->m_out->sendEvent(ev);
+ const NoteOnEvent* n = static_cast<const NoteOnEvent*>(ev);
+ emit midiNoteOn(n->getChannel(), n->getKey(), n->getVelocity());
+ }
+ break;
+ case SND_SEQ_EVENT_KEYPRESS: {
+ d->m_out->sendEvent(ev);
+ const KeyPressEvent* n = static_cast<const KeyPressEvent*>(ev);
+ emit midiKeyPressure(n->getChannel(), n->getKey(), n->getVelocity());
+ }
+ break;
+ case SND_SEQ_EVENT_CONTROLLER:
+ case SND_SEQ_EVENT_CONTROL14: {
+ d->m_out->sendEvent(ev);
+ const ControllerEvent* n = static_cast<const ControllerEvent*>(ev);
+ emit midiController(n->getChannel(), n->getParam(), n->getValue());
+ }
+ break;
+ case SND_SEQ_EVENT_PGMCHANGE: {
+ d->m_out->sendEvent(ev);
+ const ProgramChangeEvent* p = static_cast<const ProgramChangeEvent*>(ev);
+ emit midiProgram(p->getChannel(), p->getValue());
+ }
+ break;
+ case SND_SEQ_EVENT_CHANPRESS: {
+ d->m_out->sendEvent(ev);
+ const ChanPressEvent* n = static_cast<const ChanPressEvent*>(ev);
+ emit midiChannelPressure(n->getChannel(), n->getValue());
+ }
+ break;
+ case SND_SEQ_EVENT_PITCHBEND: {
+ d->m_out->sendEvent(ev);
+ const PitchBendEvent* n = static_cast<const PitchBendEvent*>(ev);
+ emit midiPitchBend(n->getChannel(), n->getValue());
+ }
+ break;
+ default:
+ d->m_out->sendEvent(ev);
+ }
delete ev;
}
Index: kmid2.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kmid2/F-11/kmid2.spec,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -p -r1.10 -r1.11
--- kmid2.spec 30 May 2010 23:57:23 -0000 1.10
+++ kmid2.spec 3 Jun 2010 21:42:55 -0000 1.11
@@ -1,6 +1,6 @@
Name: kmid2
Version: 2.3.0
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: A MIDI/karaoke player for KDE
Group: Applications/Multimedia
@@ -10,6 +10,10 @@ URL: http://userbase.kde.org/
Source0: http://downloads.sourceforge.net/project/%{name}/%{version}/kmid-%{version}.tar.bz2
+# http://websvn.kde.org/?revision=1134129&view=revision
+# Fix a crash in the ALSA backend due to reloadDeviceList (kde#240394)
+Patch0: kmid-2.3.0-kde#240394.patch
+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: kdelibs4-devel
@@ -65,6 +69,7 @@ Provides: kmid-devel = %{version}-
%setup -q -n kmid-%{version}
# zap bundled copy of drumstick to guarantee it's never used
rm -rf drumstick
+%patch0 -p0 -b .kde#240394
%build
@@ -128,6 +133,9 @@ gtk-update-icon-cache %{_datadir}/icons/
%changelog
+* Thu Jun 03 2010 Kevin Kofler <Kevin at tigcc.ticalc.org> - 2.3.0-2
+- Fix crash in ALSA backend due to reloadDeviceList (kde#240394, upstream patch)
+
* Fri May 28 2010 Kevin Kofler <Kevin at tigcc.ticalc.org> - 2.3.0-1
- Update to 2.3.0 (new versioning scheme)
- BR drumstick-devel >= 0.3
More information about the scm-commits
mailing list