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) 2011-2013 Andreas Persson * |
7 |
|
* Copyright (C) 2014-2016 Christian Schoenebeck * |
8 |
* * |
* * |
9 |
* This program is free software; you can redistribute it and/or modify * |
* This program is free software; you can redistribute it and/or modify * |
10 |
* 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 * |
425 |
int AudioOutputDeviceCoreAudio::ParameterDevice::GetDeviceIndex() { |
int AudioOutputDeviceCoreAudio::ParameterDevice::GetDeviceIndex() { |
426 |
String s = ValueAsString(); |
String s = ValueAsString(); |
427 |
if(s.empty()) return -1; |
if(s.empty()) return -1; |
428 |
int n = s.find(' '); |
int n = (int) s.find(' '); |
429 |
s = s.substr(0, n); |
s = s.substr(0, n); |
430 |
return ToInt(s) - 1; |
return ToInt(s) - 1; |
431 |
} |
} |