src/rfxgen.c
// Show dialog: export current sound as .wav
Show dialog: export current sound as .wav
Show dialog : export current sound as . wav
static void DialogExportWave(Wave wave)
{
    const char *filters[] = { "*.wav" };
    const char *fileName = tinyfd_saveFileDialog("Export wave file", "sound.wav", 1, filters, "Wave File (*.wav)");
    if (fileName != NULL)
    {
        char outFileName[128] = { 0 };
        strcpy(outFileName, fileName);
        if ((GetExtension(outFileName) == NULL) || !IsFileExtension(outFileName, ".wav")) strcat(outFileName, ".wav\0");
        Wave cwave = WaveCopy(wave);
        WaveFormat(&cwave, wavSampleRate, wavSampleSize, 1);    
        ExportWave(cwave, outFileName);                          to file
        UnloadWave(cwave);
    }
}
static void DialogExportWave ( Wave wave ) { const char * filters [ ] = { " " } ; const char * fileName = tinyfd_saveFileDialog ( " " , " " , 1 , filters , " " ) ; if ( fileName != NULL ) { char outFileName [ 128 ] = { 0 } ; strcpy ( outFileName , fileName ) ; if ( ( GetExtension ( outFileName ) == NULL ) || ! IsFileExtension ( outFileName , " " ) ) strcat ( outFileName , " \0 " ) ; Wave cwave = WaveCopy ( wave ) ; WaveFormat ( & cwave , wavSampleRate , wavSampleSize , 1 ) ; ExportWave ( cwave , outFileName ) ; UnloadWave ( cwave ) ; } }
Show dialog: export current sound as .wav
Show dialog : export current sound as . wav
// Save file dialog // Check for valid extension and make sure it is // Export wave data // Before exporting wave data, we format it as desired // Export wave data to file