Skip to content
Snippets Groups Projects
  1. Jun 01, 2020
    • Ralph Giles's avatar
      trivial_example: Check the return value of fread(). · fefcad37
      Ralph Giles authored
      
      Silence a gcc warning by checking the return value of the fread()
      call instead of the feof() guard. This prevents an infinite loop
      in the case of a read error. Otherwise, when end-of-file is reached
      fread() will certainly return a smaller number of elements read
      than requested, so both cases are handled now.
      
      Add a comment to clarify that we're dropping a partial frame on
      purpose to keep the code simple.
      
      Also add more braces around conditional bodies for less error-prone
      style.
      
      Signed-off-by: default avatarMark Harris <mark.hsj@gmail.com>
      Verified
      fefcad37
    • Ralph Giles's avatar
      trivial_example: open raw pcm files in binary mode. · 1168a29e
      Ralph Giles authored
      
      The simple codec round-trip example file in the doc directory
      opens an input and output pcm file. It was working fine on
      POSIX systems, but not on Windows, which treats text files
      differently.
      
      This is confusing in a example, so it's better to add an
      explicit binary flag to the fopen() calls. This does nothing
      on unix-like systems, but should make the example work for
      developers on Windows.
      
      Thanks to Wavesonics who reported this on irc.
      
      Signed-off-by: default avatarMark Harris <mark.hsj@gmail.com>
      Verified
      1168a29e
  2. May 26, 2020
  3. May 10, 2020
  4. Apr 26, 2020
  5. Apr 21, 2020
  6. Apr 13, 2020
  7. Mar 23, 2020
  8. Mar 09, 2020
  9. Feb 15, 2020
  10. Feb 10, 2020
  11. Feb 03, 2020
  12. Jan 19, 2020
  13. Dec 04, 2019
  14. Dec 03, 2019
  15. Sep 03, 2019
  16. Jul 08, 2019
  17. Jun 04, 2019
  18. May 31, 2019
  19. Apr 26, 2019
  20. Apr 14, 2019
  21. Apr 12, 2019
Loading