Solved

Urgent: Converting Byte(4) into integer (VB.Net)

Posted on 2004-09-23
5
293 Views
Last Modified: 2010-04-23
ok, what I've got is...

24 08 00 00 which is apparently equal to 2084

equally

10 00 00 00 = 16
99 58 01 00 = 88200

I'm attempting breaking down a wave file for analysis.  I'm getting all my information off http://ccrma.stanford.edu/CCRMA/Courses/422/projects/WaveFormat/

Sorry if I'm sounding stupid but I'm having a bit of difficulty working with this out... It's probably fairly obvious (well, isn't it always when you know how).

Anyway, if anyone can explain how 24080000 is equal to 2084... please help! ;)

I'm hoping it's simple enough so a simple function would calculate it for the rest of the value i'll need in the file!

Thanks,

Tim
0
Comment
Question by:w3tim
  • 3
  • 2
5 Comments
 
LVL 4

Expert Comment

by:jrandallsexton
ID: 12134790
Looks like you have hex:
2084d = h824 (turn it around 24 08 00 00h)
88200d = h15888

0
 
LVL 4

Author Comment

by:w3tim
ID: 12134888
Sorry, end of the day for me, I'm struggling.

Could you give me a rought guide for what I'm looking to do with the code!!
0
 
LVL 4

Accepted Solution

by:
jrandallsexton earned 500 total points
ID: 12135054
Well, since these hex values are coming in reverse...

It seems that you're going to have to write a function to transpose
88 58 01 00
into
00 01 58 88

Then you can use this:
MsgBox(CLng("&H" & "00015888").ToString)
to give you the decimal value.
0
 
LVL 4

Author Comment

by:w3tim
ID: 12135156
Fantastic, that seems to be what I need :)!
0
 
LVL 4

Expert Comment

by:jrandallsexton
ID: 12135164
Glad I could help.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now