Remco wrote:

>>> ... endless clicking noise intermixed with music ...
> 
>> sounds like the mp "delayed interrupt notification" issue that wreaks
>> havoc on audio.
>> 
> 
> I was expecting the writes to the audio device to fail (EAGAIN) if the
> previous buffer isn't done playing yet. Basically I don't expect POLLOUT
> to be set until all software buffers have been drained and the data has
> been written to the device completely. Unless I'm doing something wrong or
> misinterpreting something, this doesn't seem to be the case.

Another simplified way of looking at this in stub code:

{
  open_wavefile_for_reading();
  open_audio_device_for_writing();
  set_audio_device_to_non_blocking_mode();
  read_large_chunk_of_data_from_wavefile();
  write_large_chunk_of_data_to_audio_device();
  poll_for_POLLOUT_on_audio_device();
}

I'd expect this to play the large chunk of data but it returns almost
immediately, only playing a fraction of a second.

I'm not sure whether this is a misconception on my part.



Reply via email to