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

BOOL PSoundChannelSunAudio::Abort (  ) [virtual]

Abort the background playing/recording of the sound channel.

TRUE if the sound has successfully been aborted.

Reimplemented from PSoundChannel.

Definition at line 481 of file sound_sunaudio.cxx.

References PChannel::os_handle.

  audio_info_t audio_info;
  int err;

  if (os_handle < 0) 
    PTRACE(1,"PSoundChannelSunAudio::Abort() os_handle is invalid");
    return FALSE;


  audio_info.play.channels = mDefaultPlayNumChannels; 
  audio_info.play.sample_rate= mDefaultPlaySampleRate; 
  audio_info.play.precision = mDefaultPlayBitsPerSample; 

  audio_info.record.channels =  mDefaultRecordNumChannels;
  audio_info.record.sample_rate =  mDefaultRecordSampleRate; 
  audio_info.record.precision =  mDefaultRecordBitsPerSample; 
  audio_info.record.encoding =  mDefaultRecordEncoding; 
  audio_info.record.port =  mDefaultRecordPort; 

  err = ::ioctl(os_handle, AUDIO_SETINFO, &audio_info);     // Let's recheck the configuration...
  if (err==EINVAL || err==EBUSY)
    return FALSE;

  return TRUE;

Generated by  Doxygen 1.6.0   Back to index