4
오디오를 여러 개의 AirPlay 대상에 스트리밍하는 방법을 아는 사람이 있습니까? 분명히 이것은 과거의 Core Audio를 통해 가능했지만, 10.9와 10.10에서는 가능하지 않습니다. iTunes가 그것을 수행하므로 비밀은 무엇입니까? 여러 개의 AirPlay 장치에 오디오 스트리밍
OSStatus err = 0;
UInt32 size = sizeof(UInt32);
SSAudioSource * targetSource = airplayDevice.airplaySources[0];
AudioDeviceID airPlayDeviceID = targetSource.deviceID;
SSAudioSource * source1 = airplayDevice.airplaySources[0];
SSAudioSource * source2 = airplayDevice.airplaySources[1];
SSAudioSource * source3 = airplayDevice.airplaySources[2];
AudioDeviceID alldevices[] = {source3.sourceID, source2.sourceID, source1.sourceID};
AudioObjectPropertyAddress addr;
addr.mSelector = kAudioDevicePropertyDataSource;
addr.mScope = kAudioDevicePropertyScopeOutput;
addr.mElement = kAudioObjectPropertyElementMaster;
// Set the 'AirPlay' device to point to all of its sources...
err = AudioObjectSetPropertyData(airPlayDeviceID, &addr, 0, nil, size, alldevices);
AudioObjectPropertyAddress audioDevicesAddress = {
kAudioHardwarePropertyDefaultOutputDevice,
kAudioObjectPropertyScopeGlobal,
kAudioObjectPropertyElementMaster
};
// ...now set the system output to point at the 'AirPlay' device
err = AudioObjectSetPropertyData(kAudioObjectSystemObject, &audioDevicesAddress, 0, nil, size, &airPlayDeviceID);
가 아무리 배열에있는 장치를 마련하는 방법 만 울리지 않게 배열 (인덱스 0) 첫 번째 장치에서 나오는 : 여기에 몇 가지 내가 얻을 수 있는지 확인하기 위해 노력 코드이 작업입니다. 비밀이 뭐니? 감사
글쎄, 그건 불행한 일이지만, 답장을 보내 주셔서 감사합니다. 이 방법을 사용할 수있는 다른 방법을 찾은 경우 실제로 듣는 데 감사드립니다. – Lazloman