2014-10-23 5 views
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) 첫 번째 장치에서 나오는 : 여기에 몇 가지 내가 얻을 수 있는지 확인하기 위해 노력 코드이 작업입니다. 비밀이 뭐니? 감사

답변

1

나는 7 월이 다시 애플에 버그 리포트를 제기하고 10 월에 회신을 받았는데 :

엔지니어링이 문제를 해결 할 계획이 없다고 결정했습니다

.

필자는 기능이 제거되었지만시기 적절한 응답을 얻지 못한 이유를 Apple에 의뢰했습니다.

나는 귀하의 접근 방식이 정확하다고 생각합니다. 이전에 앱에서 사용했던 방식과 유사합니다. 나는 iTunes가 Audio Units 또는 비슷한 것을 사용하여 여러 명의 스피커를 사용하는 것으로 의심합니다.

+0

글쎄, 그건 불행한 일이지만, 답장을 보내 주셔서 감사합니다. 이 방법을 사용할 수있는 다른 방법을 찾은 경우 실제로 듣는 데 감사드립니다. – Lazloman