<div dir="ltr"><div>I seem to be to silly for it:</div><div># sox in.wav -r 22050 out.wav resample<br>sox FAIL formats: can't open input file `out.wav': No such file or directory<br><br></div><div>Of course there is no out.wav since that's what I want to create!<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Aug 27, 2021 at 4:28 PM guest271314 <<a href="mailto:guest271314@gmail.com">guest271314@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">What happens when you resample to 22050?</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Aug 27, 2021 at 7:18 AM mindfsck <<a href="mailto:mindfsck@gmail.com" target="_blank">mindfsck@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Why is the sample rate set to 48000?</div></blockquote><div><br></div><div>No idea! The sourcing of the file is outside of my hands.. <br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Aug 27, 2021 at 4:14 PM guest271314 <<a href="mailto:guest271314@gmail.com" target="_blank">guest271314@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Why is the sample rate set to 48000?</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Aug 27, 2021 at 6:40 AM mindfsck <<a href="mailto:mindfsck@gmail.com" target="_blank">mindfsck@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div>Thanks Sean. I unloaded the suspend module but the plop is still there.<br></div>I don't really think it is HW related since the file plays just fine with paplay and aplay.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Aug 27, 2021 at 5:49 AM Sean Greenslade <<a href="mailto:sean@seangreenslade.com" target="_blank">sean@seangreenslade.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Thu, Aug 26, 2021 at 09:43:23PM +0200, mindfsck wrote:<br>
> Hi there,<br>
> <br>
> I was using this example to simply play a WAV file without having much clue<br>
> of audio:<br>
> <a href="https://www.freedesktop.org/software/pulseaudio/doxygen/pacat-simple_8c-example.html" rel="noreferrer" target="_blank">https://www.freedesktop.org/software/pulseaudio/doxygen/pacat-simple_8c-example.html</a><br>
> I changed the sources to match (IMHO) my settings, i.e. channels=1 and<br>
> rate=48000.<br>
> <br>
> I have two wavefiles, the first plays as it should (compared with command<br>
> line paplay or aplay) and the second one has an audible PLOP (but only<br>
> around 90% of the time) at the very beginning of playback:<br>
> <br>
> (1 - OK)<br>
> General<br>
> Complete name : out_clean.wav<br>
> Format : Wave<br>
> File size : 81.3 KiB<br>
> Duration : 866 ms<br>
> Overall bit rate mode : Constant<br>
> Overall bit rate : 769 kb/s<br>
> Audio<br>
> Format : PCM<br>
> Format settings : Little / Signed<br>
> Codec ID : 1<br>
> Duration : 866 ms<br>
> Bit rate mode : Constant<br>
> Bit rate : 768 kb/s<br>
> Channel(s) : 1 channel<br>
> Sampling rate : 48.0 kHz<br>
> Bit depth : 16 bits<br>
> Stream size : 81.2 KiB (100%)<br>
> <br>
> (2 - NOK)<br>
> General<br>
> Complete name : out_short_clean.wav<br>
> Format : Wave<br>
> File size : 22.8 KiB<br>
> Duration : 242 ms<br>
> Overall bit rate mode : Constant<br>
> Overall bit rate : 772 kb/s<br>
> Audio<br>
> Format : PCM<br>
> Format settings : Little / Signed<br>
> Codec ID : 1<br>
> Duration : 242 ms<br>
> Bit rate mode : Constant<br>
> Bit rate : 768 kb/s<br>
> Channel(s) : 1 channel<br>
> Sampling rate : 48.0 kHz<br>
> Bit depth : 16 bits<br>
> Stream size : 22.8 KiB (100%)<br>
> <br>
> I tried using different BUFSIZE and my systemload is also not an issue...<br>
> Any ideas?<br>
<br>
I've experienced something like this with a few built-in audio cards on<br>
various laptops. It's never bothered me enough to track it down, but I<br>
suspect it's due to the suspending and resuming of cards. Can you try<br>
disabling the autosuspend module and see if it still happens? Use this<br>
command to temporarily disable it until the next time pulse reloads:<br>
<br>
$ pactl unload-module module-suspend-on-idle<br>
<br>
--Sean<br>
<br>
</blockquote></div>
</blockquote></div>
</blockquote></div>
</blockquote></div>
</blockquote></div>