mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-12-15 00:51:25 +01:00
2019-08-26 Fred Gleason <fredg@paravelsystems.com>
* Updated rdalsaconfig(8) to include a 'rate <sr>' line in each asound.conf(5) entry.
This commit is contained in:
@@ -26,9 +26,11 @@
|
||||
|
||||
#include <rdalsamodel.h>
|
||||
|
||||
RDAlsaModel::RDAlsaModel(QObject *parent)
|
||||
RDAlsaModel::RDAlsaModel(unsigned samprate,QObject *parent)
|
||||
: QAbstractListModel(parent)
|
||||
{
|
||||
model_sample_rate=samprate;
|
||||
|
||||
LoadSystemConfig();
|
||||
}
|
||||
|
||||
@@ -45,6 +47,19 @@ int RDAlsaModel::rowCount(const QModelIndex &parent) const
|
||||
}
|
||||
|
||||
|
||||
Qt::ItemFlags RDAlsaModel::flags(const QModelIndex &index) const
|
||||
{
|
||||
Qt::ItemFlags flags=QAbstractListModel::flags(index);
|
||||
|
||||
if((model_alsa_cards.at(model_card_index.at(index.row()))->id()=="Axia")&&
|
||||
(model_sample_rate!=48000)) {
|
||||
flags=flags&Qt::ItemIsEnabled;
|
||||
}
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
||||
|
||||
QVariant RDAlsaModel::data(const QModelIndex &index,int role) const
|
||||
{
|
||||
int row=index.row();
|
||||
|
||||
Reference in New Issue
Block a user