"Bad Wave Format" - Error

The Partridge Family were neither partridges nor a family. Discuss.
Post Reply
User avatar
SlevinKelevra
Posts: 80
Joined: September 9th, 2013, 12:58 am
Location: Germany

"Bad Wave Format" - Error

Post by SlevinKelevra » February 15th, 2017, 2:40 pm

Hey Chili,

after some years break I am back to your tutorials. Currently I am coding some stuff for the Fart-Annoyed game (will maybe create a thread soon, when there is something to show). My problem is, that I am getting errors when addding (some) wave sounds:

"bad wave format (nChannels)".

Is there a way to use these sounds? If no, can you or someone else suggest a free wave sound page, with sounds, which work in chilis framework?
Carpe noctem

User avatar
SlevinKelevra
Posts: 80
Joined: September 9th, 2013, 12:58 am
Location: Germany

Re: "Bad Wave Format" - Error

Post by SlevinKelevra » February 15th, 2017, 2:55 pm

I found a workaround:

http://online-audio-converter.com/

Loading wave files and converting them to wave again makes them usable in chilis framework.
Carpe noctem

User avatar
Yumtard
Posts: 575
Joined: January 19th, 2017, 10:28 pm
Location: Idiot from northern Europe

Re: "Bad Wave Format" - Error

Post by Yumtard » February 15th, 2017, 3:04 pm

They need to be 44100hz.

albinopapa
Posts: 4373
Joined: February 28th, 2013, 3:23 am
Location: Oklahoma, United States

Re: "Bad Wave Format" - Error

Post by albinopapa » February 15th, 2017, 3:52 pm

Yeah, the wav files need to be 44,100 KHz, 16 bits per channel and 2 channels for the chili framework.
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: "Bad Wave Format" - Error

Post by chili » February 16th, 2017, 1:45 am

Yup, to make the pool of audio channels able to play any sound, all the sounds have to have the same format. There are various ways around this, but I don't have the time to spend that much of it on the sound module.

You can convert all sounds to the format mentioned above, or if you have all your sounds in another format (all the same format) already, you can go into Sound.h and change the format that the system uses (check the comments).
Chili

Post Reply