Browse Source

Minor text formatting issues.

noexceptions
Gary Scavone 6 years ago
parent
commit
a09f92013c
2 changed files with 7 additions and 6 deletions
  1. +6
    -5
      RtAudio.cpp
  2. +1
    -1
      RtAudio.h

+ 6
- 5
RtAudio.cpp View File

@@ -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.


+ 1
- 1
RtAudio.h View File

@@ -510,7 +510,7 @@ class RTAUDIO_DLL_PUBLIC RtAudio
0 and getDeviceCount() - 1.
\param format An RtAudioFormat specifying the desired sample data format.
\param sampleRate The desired sample rate (sample frames per second).
\param *bufferFrames A pointer to a value indicating the desired
\param bufferFrames A pointer to a value indicating the desired
internal buffer size in sample frames. The actual value
used by the device is returned via the same pointer. A
value of zero can be specified, in which case the lowest


Loading…
Cancel
Save