Example #1
0
void CPulseAE::EnumerateOutputDevices(AEDeviceList &devices, bool passthrough)
{
  if (!m_MainLoop || ! m_Context)
    return;

  pa_threaded_mainloop_lock(m_MainLoop);

  SinkInfoStruct sinkStruct;
  sinkStruct.passthrough = passthrough;
  sinkStruct.mainloop = m_MainLoop;
  sinkStruct.list = &devices;
  CStdString def;
  def.Format("%s (PulseAudio)",g_localizeStrings.Get(409).c_str());
  devices.push_back(AEDevice(def, "pulse:default@default"));
  WaitForOperation(pa_context_get_sink_info_list(m_Context,
                   SinkInfo, &sinkStruct), m_MainLoop, "EnumerateAudioSinks");

  pa_threaded_mainloop_unlock(m_MainLoop);
}
Example #2
0
void CCoreAudioAEHALOSX::EnumerateOutputDevices(AEDeviceList &devices, bool passthrough)
{
  CoreAudioDeviceList deviceList;
  CCoreAudioHardware::GetOutputDevices(&deviceList);

  std::string defaultDeviceName;
  CCoreAudioHardware::GetOutputDeviceName(defaultDeviceName);

  std::string deviceName;
  for (int i = 0; !deviceList.empty(); i++)
  {
    CCoreAudioDevice device(deviceList.front());
    deviceName = device.GetName();

    std::string deviceName_Internal = std::string("CoreAudio:");
    deviceName_Internal.append(deviceName);
    devices.push_back(AEDevice(deviceName, deviceName_Internal));

    deviceList.pop_front();
  }
}
Example #3
0
void CAESinkProfiler::EnumerateDevices (AEDeviceList &devices, bool passthrough)
{
  devices.push_back(AEDevice("Profiler", "Profiler"));
}