• [PATCH] libao - use binary mode

    From Bogdan@21:1/5 to All on Mon Sep 1 23:55:01 2025
    Hello.

    While playing with the libao port, I noticed that WAV file output
    sounds bad. When comparing the output files (one from Linux, one from
    DOS), I saw the obvious - something which looked like a non-DOS
    newline was converted to a DOS newline, corrupting the output file.

    I've prepared a small patch that should fix the issue. Pasting it
    below. I hope I've done it correctly. No other suspicious places have
    been identified. The patch should actually fix all file output types.

    Thank you for your work on DJGPP, it's appreciated! :)



    --- libao-1.2.0.orig/src/audio_out.c 2022-10-22 22:53:10.000000000
    +0200
    +++ libao-1.2.0/src/audio_out.c 2025-09-01 22:57:28.603178971 +0200
    @@ -1383,7 +1383,7 @@ ao_device *ao_open_file (int driver_id,
    }


    - file = fopen(filename, "w");
    + file = fopen(filename, "wb");
    }

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)