Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

convert RIFX to RIFF

Featured Replies

  • Author
  • Localization

AlphaTwentyThree, posted Sun Oct 19, 2014 10:11 am (1052)


Hello folks!

Does anybody know if there is a tool or script to convert RIFX files to RIFF? Not all codecs regarded, only the standard PCM and ADPCM ones (PCM, MS_ADPCM, IMA_ADPCM).
If you need samples, here are some for MS_ADPCM: http://upfile.mobi/655416
Thanks for your help! :)
  • Author
  • Localization

aluigi, posted Sun Oct 19, 2014 4:05 pm (1061)


As far as I can see the only difference with a normal RIFF is the endianess.
Exists a very basic way to do this job with quickbms, basically all you need to create is a script that parses the format (no extraction), then use "quickbms -w -E script.bms backup_file.lwav" and backup_file will contain all the fields in reverse endian.

The following is a script able to read any RIFF and RIFX with automatic endian guessing, if you use it with -E it will auotmatically reverse the endianess.
Code:
idstring "RIF"
get TYPE byte
get SIZE long
endian guess SIZE
idstring "WAVE"
get RIFF_SIZE asize
savepos NEXT_OFF
for NEXT_OFF = NEXT_OFF < RIFF_SIZE
    getdstring CHUNK_TYPE 4
    get CHUNK_SIZE long

    savepos CHUNK_OFF
    xmath NEXT_OFF "CHUNK_OFF CHUNK_SIZE"

    if CHUNK_TYPE == "fmt "
        get wFormatTag short
        get wChannels short
        get dwSamplesPerSec long
        get dwAvgBytesPerSec long
        get wBlockAlign short
        get wBitsPerSample short

        savepos TMP
        for TMP = TMP < NEXT_OFF
            get DUMMY short
        next TMP = 2

    elif CHUNK_TYPE == "akd "
        getdstring DUMMY 0x10

        savepos TMP
        for TMP = TMP < NEXT_OFF
            get DUMMY short
        next TMP = 2

    elif CHUNK_TYPE == "data"
        if wFormatTag == 1
            savepos TMP
            for TMP = TMP < NEXT_OFF
                for c = 0 < wChannels
                    if wBitsPerSample == 8
                        get SAMPLE byte
                    elif wBitsPerSample == 16
                        get SAMPLE short
                    elif wBitsPerSample == 32
                        get SAMPLE long
                    endif
                next c
                savepos TMP
            next
        endif

    endif

    goto NEXT_OFF
next
  • Author
  • Localization

AlphaTwentyThree, posted Mon Oct 20, 2014 6:40 am (1083)


Hm, "quickbms -w -E read_riff.bms 0x0c395de5.lwav" doesn't do anything. Did I overlook something important?
  • Author
  • Localization

AlphaTwentyThree, posted Mon Oct 20, 2014 6:47 am (1084)


Wait it's ok, everything went fine. However, the file doesn't produce any usable result. Is there a way to change the interleave value? Running the file through ima_rejigger didn't help either.
  • Author
  • Localization

AlphaTwentyThree, posted Wed Oct 29, 2014 6:27 am (1345)


Anybody has an idea how to get a playable result?
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.