[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-bugs-dist
Subject: [Bug 104376] KMix from KDE CVS HEAD is crashing.
From: Christian Esken <esken () kde ! org>
Date: 2005-05-06 22:16:49
Message-ID: 20050506221649.1950.qmail () ktown ! kde ! org
[Download RAW message or body]
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
http://bugs.kde.org/show_bug.cgi?id=104376
------- Additional Comments From esken kde org 2005-05-07 00:16 -------
SVN commit 410177 by esken:
Revert the trivial getMixerElem() implementation. Bug 104376 indicates
that there are problems with it, showing the ALSA assertion:
simple.c:1415: snd_mixer_selem_has_playback_volume: Assertion
`elem->type == SND_MIXER_ELEM_SIMPLE' failed.
Most likely these problems are only with special contols, like the
routing controls found on Audigy and other modern cards.
CCBUGS:104376
M +4 -4 trunk/KDE/kdemultimedia/kmix/mixer_alsa.h
M +14 -5 trunk/KDE/kdemultimedia/kmix/mixer_alsa9.cpp
--- trunk/KDE/kdemultimedia/kmix/mixer_alsa.h #410176:410177
@ -31,10 +31,10 @
snd_mixer_elem_t* getMixerElem(int devnum);
virtual QString errorText(int mixer_error);
- //typedef QValueList<snd_mixer_selem_id_t *>AlsaMixerSidList;
- //AlsaMixerSidList mixer_sid_list;
- typedef QValueList<snd_mixer_elem_t *> AlsaMixerElemList;
- AlsaMixerElemList mixer_elem_list;
+ typedef QValueList<snd_mixer_selem_id_t *>AlsaMixerSidList;
+ AlsaMixerSidList mixer_sid_list;
+ typedef QValueList<snd_mixer_elem_t *> AlsaMixerElemList; // !! remove
+ AlsaMixerElemList mixer_elem_list; // !! remove
bool _initialUpdate;
snd_mixer_t *_handle;
--- trunk/KDE/kdemultimedia/kmix/mixer_alsa9.cpp #410176:410177
@ -190,11 +190,12 @
// ...but we still want to insert a null value into our mixer element
// list so that the list indexes match up.
mixer_elem_list.append( 0 );
+ mixer_sid_list.append( 0 );
continue;
}
- //sid = (snd_mixer_selem_id_t*)malloc(snd_mixer_selem_id_sizeof()); // I believe \
*we* must malloc it for ourself + sid = \
(snd_mixer_selem_id_t*)malloc(snd_mixer_selem_id_sizeof()); // I believe *we* must \
malloc it for ourself snd_mixer_selem_get_id( elem, sid );
bool canRecord = false;
@ -226,7 +227,7 @
cc = MixDevice::ENUM;
vol = new Volume(); // Dummy, unused
mixer_elem_list.append( elem );
- //mixer_sid_list.append( sid );
+ mixer_sid_list.append( sid );
// --- get Enum names START ---
int numEnumitems = snd_mixer_selem_get_enum_items(elem);
@ -273,7 +274,7 @
* it will be created with maxVolume == 0 && minVolume == 0 */
vol = new Volume( chn, maxVolumePlay, minVolumePlay, maxVolumeRec, minVolumeRec );
mixer_elem_list.append( elem );
- //mixer_sid_list.append( sid );
+ mixer_sid_list.append( sid );
if ( snd_mixer_selem_has_playback_switch ( elem ) ) {
//kdDebug(67100) << "has_playback_switch()" << endl;
@ -381,6 +382,7 @
}
mixer_elem_list.clear();
+ mixer_sid_list.clear();
m_mixDevices.clear();
kdDebug(67100) << "OUT Mixer_ALSA::close()" << endl;
@ -389,21 +391,28 @
snd_mixer_elem_t* Mixer_ALSA::getMixerElem(int devnum) {
-/*
snd_mixer_elem_t* elem = 0;
if ( int( mixer_sid_list.count() ) > devnum ) {
snd_mixer_selem_id_t * sid = mixer_sid_list[ devnum ];
+ // The next line (hopefully) only finds selem's, not elem's.
elem = snd_mixer_find_selem(_handle, sid);
if ( elem == 0 ) {
+ // !! Check, whether the warning should be omitted. Probably
+ // Route controls are non-simple elements.
kdDebug(67100) << "Error finding mixer element " << devnum << endl;
}
}
return elem;
-*/
+/*
+ I would have liked to use the following trivial implementation instead of the
+ code above. But it will also return elem's. which are not selem's. As there is
+ no way to check an elem's type (e.g. elem->type == SND_MIXER_ELEM_SIMPLE), callers
+ of getMixerElem() cannot check the type. :-(
snd_mixer_elem_t* elem = mixer_elem_list[ devnum ];
return elem;
+ */
}
bool Mixer_ALSA::prepareUpdateFromHW() {
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic