2 |
* * |
* * |
3 |
* LinuxSampler - modular, streaming capable sampler * |
* LinuxSampler - modular, streaming capable sampler * |
4 |
* * |
* * |
5 |
* Copyright (C) 2009 - 2013 Grigor Iliev * |
* Copyright (C) 2009 Grigor Iliev * |
6 |
|
* Copyright (C) 2013 - 2016 Andreas Persson and Christian Schoenebeck * |
7 |
* * |
* * |
8 |
* This program is free software; you can redistribute it and/or modify * |
* This program is free software; you can redistribute it and/or modify * |
9 |
* it under the terms of the GNU General Public License as published by * |
* it under the terms of the GNU General Public License as published by * |
118 |
if(charBufSize < len) { |
if(charBufSize < len) { |
119 |
delete [] charBuf; |
delete [] charBuf; |
120 |
charBufSize *= 2; |
charBufSize *= 2; |
121 |
if(charBufSize < len) charBufSize = len; |
if(charBufSize < len) charBufSize = (UInt32)len; |
122 |
charBuf = new char[charBufSize]; |
charBuf = new char[charBufSize]; |
123 |
} |
} |
124 |
|
|
274 |
|
|
275 |
UInt32 CAAudioDeviceListModel::GetOutputDeviceCount() { |
UInt32 CAAudioDeviceListModel::GetOutputDeviceCount() { |
276 |
LockGuard lock(DeviceMutex); |
LockGuard lock(DeviceMutex); |
277 |
return outDevices.size(); |
return (UInt32) outDevices.size(); |
278 |
} |
} |
279 |
|
|
280 |
CAAudioDeviceModel CAAudioDeviceListModel::GetOutputDevice(UInt32 Index) { |
CAAudioDeviceModel CAAudioDeviceListModel::GetOutputDevice(UInt32 Index) { |
281 |
LockGuard lock(DeviceMutex); |
LockGuard lock(DeviceMutex); |
282 |
if(Index < 0 || Index >= GetOutputDeviceCount()) { |
if(/*Index < 0 ||*/ Index >= GetOutputDeviceCount()) { |
283 |
throw Exception("Device index out of bounds"); |
throw Exception("Device index out of bounds"); |
284 |
} |
} |
285 |
|
|