#163144 - gauauu - Tue Sep 23, 2008 9:52 pm
I've got binary audio data that I'm compiling into my game, but which isn't working right. Maybe somebody can tell me what's wrong.
I have some audio files. I'm using $(bin2o) from devkitArm's base_rules to convert it to an object file to link in.
The assembly that is created by bin2s looks like:
As far as I understand, I should then be able to access it from C:
The value of thunk_wav_size that I get when I read it, though, is 16391510. The pointer to the beginning of the binary blob is also wrong.
What makes it more odd is that there are about 10 sound files. Two or three of them work fine. The others are all messed up in similar ways.
Any ideas what's going on, or what I'm doing wrong?
I have some audio files. I'm using $(bin2o) from devkitArm's base_rules to convert it to an object file to link in.
The assembly that is created by bin2s looks like:
Code: |
/* Generated by BIN2S - please don't edit directly */ .section .rodata .balign 4 .global thunk_wav_size .global thunk_wav thunk_wav: .byte 70, 79, 82, 77, 0, 0, 29, 78, 65, 73, 70, 70, 67, 79, 77, 77 .byte 0, 0, 0, 18, 0, 1, 0, 0, 28,226, 0, 8, 64, 14,172, 68 ...snip.... .byte 253,254,255, 1, 1, 2, 3, 3, 4, 4, 4, 3, 2, 1, 0,255 .byte 255,254,253,252,250, 0 .global thunk_wav_end thunk_wav_end: thunk_wav_size: .int 7510 |
As far as I understand, I should then be able to access it from C:
Code: |
extern const u32 thunk_wav_size; displayNumber(thunk_wav_size); if (thunk_wav_size == 7510) { //it SHOULD get here...but doesn't } |
The value of thunk_wav_size that I get when I read it, though, is 16391510. The pointer to the beginning of the binary blob is also wrong.
What makes it more odd is that there are about 10 sound files. Two or three of them work fine. The others are all messed up in similar ways.
Any ideas what's going on, or what I'm doing wrong?