Menu

#259 sox WARN formats: can't set sample rate X; using Y

closed-invalid
nobody
None
5
2018-04-28
2015-03-09
londero
No

When SoX is asked to record at any sampling rate (-r switch), it warns it "can't set sample rate" to that rate and that it's using 48000 Hz instead. This happens on two different PCs (both running Debian) using three different sound devices.

ffmpeg and arecord both record at specified rate without any trouble, so it seems like it's a SoX bug.

Please find debug log attached.

1 Attachments

Discussion

  • Mans Rullgard

    Mans Rullgard - 2018-04-28
    • status: open --> closed-invalid
     
  • Mans Rullgard

    Mans Rullgard - 2018-04-28

    Most modern sound devices support only multiples of 44100 and 48000 Hz. Some (cheap) sound cards even support only 48 kHz. Depending on the system configuration, ALSA may automatically resample to the reqested rate. Sox disables this feature, which probably explains the difference in behaviour you're seeing.

     

Log in to post a comment.

MongoDB Logo MongoDB