--- qsampler/trunk/src/qsamplerDevice.cpp 2007/12/06 14:23:39 1559 +++ qsampler/trunk/src/qsamplerDevice.cpp 2010/02/17 19:50:04 2059 @@ -1,8 +1,8 @@ // qsamplerDevice.cpp // /**************************************************************************** - Copyright (C) 2004-2007, rncbc aka Rui Nuno Capela. All rights reserved. - Copyright (C) 2007, Christian Schoenebeck + Copyright (C) 2004-2010, rncbc aka Rui Nuno Capela. All rights reserved. + Copyright (C) 2007, 2008 Christian Schoenebeck This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -702,6 +702,17 @@ return piDeviceIDs; } +std::set Device::getDeviceIDs(lscp_client_t *pClient, + DeviceType deviceType) +{ + std::set result; + int* piDeviceIDs = getDevices(pClient, deviceType); + if (!piDeviceIDs) return result; + for (int i = 0; piDeviceIDs[i] != -1; ++i) + result.insert(piDeviceIDs[i]); + return result; +} + // Driver names enumerator. QStringList Device::getDrivers ( lscp_client_t *pClient, @@ -1183,7 +1194,7 @@ ); pSpinBox->setMaximum( (!r.param.range_max.isEmpty()) ? - r.param.range_max.toInt() : (1 << 16) // or better a nigher default max value ? + r.param.range_max.toInt() : (1 << 24) // or better a higher default max value ? ); pSpinBox->setValue(val.toInt()); return pSpinBox;