Menu

#312 Null byte at the end of gsrt files causes a click in playback

closed-fixed
nobody
None
5
2020-08-03
2018-08-10
No

When SoX writes a gsrt file, it checks for an odd number of samples and pads the file with a single 0x00 sample. This causes an audible click at the end of the file because the silence is represented by 0xff samples:

00007eb0: ffff ffff ffff ffff ffff ffff ffff ffff ................
00007ec0: ffff ffff ffff ffff ffff ffff ffff ff00 ................

Changing the padding byte from 0 to 0xff at gsrt.c line 161 eliminates the click.

https://sourceforge.net/p/sox/code/ci/master/tree/src/gsrt.c#l161

Discussion

  • Mans Rullgard

    Mans Rullgard - 2020-08-03
    • status: open --> closed-fixed
     
  • Mans Rullgard

    Mans Rullgard - 2020-08-03

    Fixed.

     

Log in to post a comment.