Skip to content

Commit 1c46bdc

Browse files
committed
Don't use manufacturer name in device name for CoreAudio.
1 parent 7aba116 commit 1c46bdc

File tree

1 file changed

+2
-19
lines changed

1 file changed

+2
-19
lines changed

RtAudio.cpp

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1228,25 +1228,8 @@ bool RtApiCore :: probeDeviceInfo( AudioDeviceID id, RtAudio::DeviceInfo& info )
12281228
AudioObjectPropertyAddress property = { kAudioObjectPropertyManufacturer,
12291229
kAudioObjectPropertyScopeGlobal,
12301230
KAUDIOOBJECTPROPERTYELEMENT };
1231-
OSStatus result = AudioObjectGetPropertyData( id, &property, 0, NULL, &dataSize, &cfname );
1232-
if ( result != noErr ) {
1233-
errorStream_ << "RtApiCore::probeDeviceInfo: system error (" << getErrorCode( result ) << ") getting device manufacturer.";
1234-
errorText_ = errorStream_.str();
1235-
error( RTAUDIO_WARNING );
1236-
return false;
1237-
}
1238-
1239-
long length = CFStringGetLength(cfname);
1240-
char *mname = (char *)malloc(length * 3 + 1);
1241-
#if defined( UNICODE ) || defined( _UNICODE )
1242-
CFStringGetCString(cfname, mname, length * 3 + 1, kCFStringEncodingUTF8);
1243-
#else
1244-
CFStringGetCString(cfname, mname, length * 3 + 1, CFStringGetSystemEncoding());
1245-
#endif
1246-
info.name.append( (const char *)mname, strlen(mname) );
1247-
info.name.append( ": " );
1248-
CFRelease( cfname );
1249-
free(mname);
1231+
OSStatus result;
1232+
long length;
12501233

12511234
property.mSelector = kAudioObjectPropertyName;
12521235
result = AudioObjectGetPropertyData( id, &property, 0, NULL, &dataSize, &cfname );

0 commit comments

Comments
 (0)