/[svn]/linuxsampler/trunk/src/drivers/audio/CAAudioDeviceModel.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/drivers/audio/CAAudioDeviceModel.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3053 by schoenebeck, Wed Sep 4 20:40:12 2013 UTC revision 3054 by schoenebeck, Thu Dec 15 12:47:45 2016 UTC
# Line 2  Line 2 
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  *
# Line 117  namespace LinuxSampler { Line 118  namespace LinuxSampler {
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                    
# Line 273  namespace LinuxSampler { Line 274  namespace LinuxSampler {
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    

Legend:
Removed from v.3053  
changed lines
  Added in v.3054

  ViewVC Help
Powered by ViewVC