Jump to content
RaccoonCity

How to remove extra junks when I add/remove a string in a hex editor

Recommended Posts

RaccoonCity

I'm trying to modify a wav file in 010 hex Editor. all I want is remove this 'fact' chunk:

66 61 63 74 04 00 00 00 48 1A 00 00

and add this string to the end:

73 6D 70 6C 3C 00 00 00 00 00 00 00 00 00 00 00 2C 51 00 00 3C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 74 49 4D 45 08 00 00 00 DE 07 09 18 17 0F 27 00 76 65 72 2E 04 00 00 00 01 00 00 00

When I export it and put it in a Riff editor, this warning message pops up:

"There's extra junk at the end of the file."

As an amateur, my best guess is it has something to do with the length of the modified strings. If it's so then the question is, how may I calculate the right length and remove extra junks ?

Here's is the Source Wave

here's the Modified Wave

 

 

 

Share this post


Link to post
Share on other sites
Melba23

RaccoonCity,

Welcome to the AutoIt forums.

Is there actually an AutoIt question in there or are you just making a general query about WAV files? If the former, please explain exactly what problem you are having with AutoIt - if the latter I suggest searching t'interWeb for information about the RIFF header, which holds the overall size of the WAV file and needs to be changed when you subtract add bytes to it.

M23


Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______Open Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
RaccoonCity

Oops! Apologies!

My question is kind of related to hex editors and I'm not sure if it has anything to do with autoit.. I just searched for my problem and this forum was on top. I thought it was a regular forum where I can ask my question.

 

Share this post


Link to post
Share on other sites
Melba23

RaccoonCity,

This is a forum dedicated to helping people write scripts in the AutoIt language, not a place for general programming questions. But my advice still stands - go and look at the RIFF header format as you will need to adjust the size parameter if you want to change the size of the WAV file.

But take a look around before you go - we would be happy to see you back if you decided AutoIt was something you wanted to use in future.

M23


Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______Open Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×