Re: Audible plop at beginning when using pcat-simple

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Aug 29, 2021 at 07:02:25PM +0200, mindfsck wrote:
> or use 'vlc' or use any Video/Audio playback you have on your machine.Sigh,
> I may just reach out for alternative APIs instead of trying to convince
> people that this might be a bug in the simple API you provide.

Apologies for leading you down a dead-end. I've taken a closer look
at the code and found what the problem is. The pacat-simple.c example is
expecting raw PCM sample data in the file. Since you're giving it a .WAV
file, there is a metadata header at the beginning that it is trying to
interpret as audio.

Try inserting this line just above the /* Read some data ... */ line:

read(STDIN_FILENO, buf, 44); // Discard the .WAV header

--Sean




[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux