Logo Search packages:      
Sourcecode: pwlib version File versions  Download package

PString PSoundChannel::GetDefaultDevice ( Directions  dir  )  [static]

Get the name for the default sound devices/driver that is on this platform. Note that a named device may not necessarily do both playing and recording so the arrays returned with the dir# parameter in each value is not necessarily the same.

This will return a list of uniqie device names across all of the available drivers. If two drivers have identical names for devices, then the string returned will be of the form driver+''+device.

A platform dependent string for the sound player/recorder.

Definition at line 171 of file sound.cxx.

References PString::Empty().

Referenced by PSound::Play(), and PSound::PlayFile().

  PStringList devices = GetDeviceNames(dir);
  if (devices.GetSize() > 0)
    return devices[0];

  return PString::Empty();

Generated by  Doxygen 1.6.0   Back to index