summaryrefslogtreecommitdiff
path: root/RtAudio.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'RtAudio.cpp')
-rw-r--r--RtAudio.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/RtAudio.cpp b/RtAudio.cpp
index d92a13a..a14f954 100644
--- a/RtAudio.cpp
+++ b/RtAudio.cpp
@@ -150,6 +150,7 @@ extern "C" const RtAudio::Api rtaudio_compiled_apis[] = {
#endif
RtAudio::UNSPECIFIED,
};
+
extern "C" const unsigned int rtaudio_num_compiled_apis =
sizeof(rtaudio_compiled_apis)/sizeof(rtaudio_compiled_apis[0])-1;
}
@@ -697,7 +698,7 @@ RtAudio::DeviceInfo RtApiCore :: getDeviceInfo( unsigned int device )
}
//const char *mname = CFStringGetCStringPtr( cfname, CFStringGetSystemEncoding() );
- int length = CFStringGetLength(cfname);
+ long length = CFStringGetLength(cfname);
char *mname = (char *)malloc(length * 3 + 1);
#if defined( UNICODE ) || defined( _UNICODE )
CFStringGetCString(cfname, mname, length * 3 + 1, kCFStringEncodingUTF8);
@@ -1045,7 +1046,7 @@ bool RtApiCore :: probeDeviceOpen( unsigned int device, StreamMode mode, unsigne
}
// Look for a single stream meeting our needs.
- UInt32 firstStream, streamCount = 1, streamChannels = 0, channelOffset = 0;
+ UInt32 firstStream = 0, streamCount = 1, streamChannels = 0, channelOffset = 0;
for ( iStream=0; iStream<nStreams; iStream++ ) {
streamChannels = bufferList->mBuffers[iStream].mNumberChannels;
if ( streamChannels >= channels + offsetCounter ) {
@@ -1096,9 +1097,9 @@ bool RtApiCore :: probeDeviceOpen( unsigned int device, StreamMode mode, unsigne
return FAILURE;
}
- if ( bufferRange.mMinimum > *bufferSize ) *bufferSize = (unsigned long) bufferRange.mMinimum;
- else if ( bufferRange.mMaximum < *bufferSize ) *bufferSize = (unsigned long) bufferRange.mMaximum;
- if ( options && options->flags & RTAUDIO_MINIMIZE_LATENCY ) *bufferSize = (unsigned long) bufferRange.mMinimum;
+ if ( bufferRange.mMinimum > *bufferSize ) *bufferSize = (unsigned int) bufferRange.mMinimum;
+ else if ( bufferRange.mMaximum < *bufferSize ) *bufferSize = (unsigned int) bufferRange.mMaximum;
+ if ( options && options->flags & RTAUDIO_MINIMIZE_LATENCY ) *bufferSize = (unsigned int) bufferRange.mMinimum;
// Set the buffer size. For multiple streams, I'm assuming we only
// need to make this setting for the master channel.