Advertisement
Advertisement
| 03.11.2008 at 12:44PM PDT, ID: 23233014 |
|
[x]
Attachment Details
|
||
| Microsoft |
| Apple |
| Internet |
| Gamers |
| Digital Living |
| Virus & Spyware |
| Hardware |
| Software |
| ITPro |
| Developer |
| Storage |
| OS |
| Database |
| Security |
| Programming |
| Web Development |
| Networking |
| Other |
| Community Support |
| 03.11.2008 at 12:48PM PDT, ID: 21099375 |
| 03.11.2008 at 01:06PM PDT, ID: 21099577 |
| 03.11.2008 at 01:12PM PDT, ID: 21099650 |
1: 2: 3: 4: 5: 6: |
unsigned char *sizestr = "\xf0\x59\x0d\x00"; /* <--- the size from the WAVE file */
unsigned int size = 0; /* <--- has to be 32 bits wide */
int i = 0;
for (i = 0; i < 4; ++i) { /* <--- loops over the 4 bytes */
size |= sizestr[i] << (4 * i); /* <--- inserts the bytes in the correct position in the unsigned int */
}
|
| 03.11.2008 at 01:14PM PDT, ID: 21099686 |
1: 2: |
unsigned char *sizestr = "\xf0\x59\x0d\x00"; /* <--- the size from the WAVE file */ unsigned int size = *((unsigned int*) sizestr); /* <--- just copy the data straight into the unsigned int */ |
| 03.11.2008 at 01:16PM PDT, ID: 21099699 |
| 03.11.2008 at 02:00PM PDT, ID: 21100297 |