mirror of
https://github.com/mumble-voip/mumble.git
synced 2025-10-26 11:19:16 +00:00
Remember wizard settings for OSS/ALSA.
git-svn-id: https://mumble.svn.sourceforge.net/svnroot/mumble/trunk@853 05730e5d-ab1b-0410-a4ac-84af385074fa
This commit is contained in:
parent
579a429cb7
commit
a4c0ceffca
@ -77,11 +77,19 @@ AudioInput *ALSAAudioInputRegistrar::create() {
|
||||
const QList<audioDevice> ALSAAudioInputRegistrar::getDeviceChoices() {
|
||||
QList<audioDevice> qlReturn;
|
||||
|
||||
QHash<QString,QString>::const_iterator i;
|
||||
QStringList qlInputDevs = cards.qhInput.keys();
|
||||
qSort(qlInputDevs);
|
||||
|
||||
if (qlInputDevs.contains(g.s.qsALSAInput)) {
|
||||
qlInputDevs.removeAll(g.s.qsALSAInput);
|
||||
qlInputDevs.prepend(g.s.qsALSAInput);
|
||||
}
|
||||
|
||||
foreach(const QString &dev, qlInputDevs) {
|
||||
QString t=QString::fromLatin1("[%1] %2").arg(dev).arg(cards.qhInput[dev]);
|
||||
qlReturn << audioDevice(t, dev);
|
||||
}
|
||||
|
||||
for (i=cards.qhInput.constBegin();i!=cards.qhInput.constEnd();++i) {
|
||||
qlReturn << audioDevice(i.value(), i.key());
|
||||
}
|
||||
return qlReturn;
|
||||
}
|
||||
|
||||
@ -100,11 +108,19 @@ AudioOutput *ALSAAudioOutputRegistrar::create() {
|
||||
const QList<audioDevice> ALSAAudioOutputRegistrar::getDeviceChoices() {
|
||||
QList<audioDevice> qlReturn;
|
||||
|
||||
QHash<QString,QString>::const_iterator i;
|
||||
QStringList qlOutputDevs = cards.qhOutput.keys();
|
||||
qSort(qlOutputDevs);
|
||||
|
||||
if (qlOutputDevs.contains(g.s.qsALSAOutput)) {
|
||||
qlOutputDevs.removeAll(g.s.qsALSAOutput);
|
||||
qlOutputDevs.prepend(g.s.qsALSAOutput);
|
||||
}
|
||||
|
||||
foreach(const QString &dev, qlOutputDevs) {
|
||||
QString t=QString::fromLatin1("[%1] %2").arg(dev).arg(cards.qhInput[dev]);
|
||||
qlReturn << audioDevice(t, dev);
|
||||
}
|
||||
|
||||
for (i=cards.qhOutput.constBegin();i!=cards.qhOutput.constEnd();++i) {
|
||||
qlReturn << audioDevice(i.value(), i.key());
|
||||
}
|
||||
return qlReturn;
|
||||
}
|
||||
|
||||
|
||||
@ -82,11 +82,18 @@ AudioInput *OSSInputRegistrar::create() {
|
||||
const QList<audioDevice> OSSInputRegistrar::getDeviceChoices() {
|
||||
QList<audioDevice> qlReturn;
|
||||
|
||||
QHash<QString,QString>::const_iterator i;
|
||||
|
||||
for (i=cards.qhInput.constBegin();i!=cards.qhInput.constEnd();++i) {
|
||||
qlReturn << audioDevice(i.value(), i.key());
|
||||
QStringList qlInputDevs = cards.qhInput.keys();
|
||||
qSort(qlInputDevs);
|
||||
|
||||
if (qlInputDevs.contains(g.s.qsOSSInput)) {
|
||||
qlInputDevs.removeAll(g.s.qsOSSInput);
|
||||
qlInputDevs.prepend(g.s.qsOSSInput);
|
||||
}
|
||||
|
||||
foreach(const QString &dev, qlInputDevs) {
|
||||
qlReturn << audioDevice(cards.qhInput.value(dev), dev);
|
||||
}
|
||||
|
||||
return qlReturn;
|
||||
}
|
||||
|
||||
@ -104,11 +111,18 @@ AudioOutput *OSSOutputRegistrar::create() {
|
||||
const QList<audioDevice> OSSOutputRegistrar::getDeviceChoices() {
|
||||
QList<audioDevice> qlReturn;
|
||||
|
||||
QHash<QString,QString>::const_iterator i;
|
||||
|
||||
for (i=cards.qhOutput.constBegin();i!=cards.qhOutput.constEnd();++i) {
|
||||
qlReturn << audioDevice(i.value(), i.key());
|
||||
QStringList qlOutputDevs = cards.qhOutput.keys();
|
||||
qSort(qlOutputDevs);
|
||||
|
||||
if (qlOutputDevs.contains(g.s.qsOSSOutput)) {
|
||||
qlOutputDevs.removeAll(g.s.qsOSSOutput);
|
||||
qlOutputDevs.prepend(g.s.qsOSSOutput);
|
||||
}
|
||||
|
||||
foreach(const QString &dev, qlOutputDevs) {
|
||||
qlReturn << audioDevice(cards.qhOutput.value(dev), dev);
|
||||
}
|
||||
|
||||
return qlReturn;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user