![]() |
![]() |
#1 |
A3000-Fan
Join Date: Sep 2008
Location: Germany
Posts: 323
|
IncBin Soundsamples
I'm trying to include some very small soundsamples into the exe of a game but I guess I'm doing something wrong.
I stripped it down to this code which does nothing but a short wait and ends after that: Code:
WBStartup DecodeSound 1,?snd1 DecodeSound 2,?snd2 DecodeSound 3,?snd3 DecodeSound 4,?snd4 DecodeSound 5,?snd5 DecodeSound 6,?snd6 DecodeSound 7,?snd7 DecodeSound 8,?snd8 Delay_ 50 End .snd1 IncBin "snd/grau.iff" .snd2 IncBin "snd/gruen.iff" .snd3 IncBin "snd/gelb.iff" .snd4 IncBin "snd/klick.iff" .snd5 IncBin "snd/gewonnen.iff" .snd6 IncBin "snd/verloren.iff" .snd7 IncBin "snd/unbekannt.iff" .snd8 IncBin "snd/start.iff" On Kick 3.2 I get a Software Failure 80000003 Requester when it ends. But ONLY when I don't include Debug-Info. Within my game I can use the sounds without a problem but again, when it ends, I get the Software Failure. On Kick 1.3 it won't even start and throws an error requester which I can't read (white on white). Even with Debug-Info. Anything obvious that I'm doing wrong? |
![]() |
![]() |
#2 |
Registered User
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 56
Posts: 2,131
|
Use only samples with even length.
|
![]() |
![]() |
#3 |
Registered User
Join Date: Nov 2019
Location: Celle / Germany
Posts: 147
|
Are you using BlitzBasic?
I fixed the wrong text colours of the error requester with AmiBlitz3. I may be a path problem. You could check this with SnoopDOS. |
![]() |
![]() |
#4 | ||
A3000-Fan
Join Date: Sep 2008
Location: Germany
Posts: 323
|
Quote:
Quote:
|
||
![]() |
![]() |
#5 |
A3000-Fan
Join Date: Sep 2008
Location: Germany
Posts: 323
|
|
![]() |
![]() |
#6 |
Registered User
Join Date: Nov 2019
Location: Celle / Germany
Posts: 147
|
What a dumb hint from me with SnoopDOS.
Obviously there is nothing to load with the samples linked to the binary :-) But there should be no crash with activated debugger. Is it turned on? |
![]() |
![]() |
#7 |
Registered User
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 56
Posts: 2,131
|
The best both. You can use any IFF sample editor. Add null (empty) byte at end, or remove last byte from odd even length sample(s).
|
![]() |
![]() |
#8 |
A3000-Fan
Join Date: Sep 2008
Location: Germany
Posts: 323
|
|
![]() |
![]() |
#9 | |
A3000-Fan
Join Date: Sep 2008
Location: Germany
Posts: 323
|
Quote:
![]() |
|
![]() |
![]() |
#10 |
Registered User
Join Date: Dec 2016
Location: Warsaw area
Posts: 153
|
please try to put the keyword "Even"
after each IncBin to make start next sounds from even addresses. like this: .snd1 IncBin "snd/grau.iff" Even |
![]() |
![]() |
#11 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,416
|
Yep, sounds like an alignment problem alright - that error probably wouldn't happen on a 68020 or above in that case. The Even keyword can be used as suggested to control the alignment of data in memory. You can also put it before the first Incbin, just in case the previous code or data ends at an odd address.
For reference, the sound data itself from an IFF-8SVX file should always be even in length, and all IFF hunks (headers etc.) should also be even in length, but it's possible that whatever software created the sample didn't entirely follow the standard. |
![]() |
![]() |
#12 |
A3000-Fan
Join Date: Sep 2008
Location: Germany
Posts: 323
|
Thanks. I had used Audacity to create the 8svx files. Loading and just saving it with Samplitude didn’t help, so I cut a tiny bit and saved it again. That worked. Next time I will test it with the Even keyword.
|
![]() |
![]() |
#13 |
Banana
Join Date: Jul 2016
Location: Darmstadt
Posts: 1,217
|
You might want to force them into chip ram too - you can do this in Amiblitz3 with the chip keyword before the first sound entry. An alternative is test the address and copy into a chip buffer if the returned address is above the chip range.
|
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
incbin in C23 | alkis | Coders. C/C++ | 3 | 10 August 2022 16:27 |
Playing a module from INCBIN in AmiBlitz 3.8 | zooperdan | Coders. Blitz Basic | 18 | 10 December 2021 08:39 |
AsmOne and IncBin | Nightshft | Coders. Asm / Hardware | 2 | 26 November 2019 16:36 |
INCBIN weirdness | neumanix | Coders. Blitz Basic | 16 | 15 September 2018 20:40 |
blitz incbin.. | yoki | Coders. General | 5 | 03 April 2009 12:29 |
|
|