g***@ftml.net
2016-06-14 18:36:53 UTC
I haven't tested this but it appears the code:
https://sourceforge.net/p/sox/code/ci/master/tree/src/coreaudio.c#l154
char name[256];
status = AudioDeviceGetProperty(devices[i],0,false,kAudioDevicePropertyDeviceName,&property_size,&name);
Needs to have
property_size = sizeof(name);
added before the AudioDeviceGetProperty call.
Otherwise property_size has the left over length from the previous request for the list of devices. I'm seeing
returned names truncated to 11 characters which is 12 including the \0 which matches the
3 device id's (at 4 bytes each) returned by the previous use of property_size.
https://sourceforge.net/p/sox/code/ci/master/tree/src/coreaudio.c#l154
char name[256];
status = AudioDeviceGetProperty(devices[i],0,false,kAudioDevicePropertyDeviceName,&property_size,&name);
Needs to have
property_size = sizeof(name);
added before the AudioDeviceGetProperty call.
Otherwise property_size has the left over length from the previous request for the list of devices. I'm seeing
returned names truncated to 11 characters which is 12 including the \0 which matches the
3 device id's (at 4 bytes each) returned by the previous use of property_size.
--
http://www.fastmail.com - Does exactly what it says on the tin
http://www.fastmail.com - Does exactly what it says on the tin