[0.0-28] fixed a bug with 16-bit samples only loading the first half properly

This commit is contained in:
Ben Russell (300178622) 2013-02-26 17:34:32 +13:00
parent d38d31f519
commit aebbc6093d
4 changed files with 10 additions and 6 deletions

View File

@ -15,6 +15,9 @@
''name'': this is wrong,
(replace '' with the double-quotes used to contain this comment)
You will need to also set "kick_on_join" to false,
or else you will not be able to join any servers!
For more info on the syntax itself, see http://json.org/
",
@ -32,4 +35,4 @@
"description": "I'm too lazy to learn how to edit my config. Laugh at me.",
"languages": ["pt", "pl"]
}
}
}

View File

@ -19,7 +19,7 @@
#define VERSION_X 0
#define VERSION_Y 0
#define VERSION_A 0
#define VERSION_Z 27
#define VERSION_Z 28
// Remember to bump "Z" basically every time you change the engine!
// Remember to bump the version in Lua too!
// Remember to document API changes in a new version!

View File

@ -16,9 +16,9 @@
]]
VERSION_ENGINE = {
cmp={0,0,0,0,27},
num=27,
str="0.0-27",
cmp={0,0,0,0,28},
num=28,
str="0.0-28",
}
VERSION_BUGS = {
@ -48,5 +48,6 @@ VERSION_BUGS = {
{intro=nil, fix=26, msg="TODO: give changelog for -25/-26 (which I think are the same version more or less)"},
{intro=nil, fix=27, msg="altered the international keyboard thing to be more backwards compatible"},
{intro=25, fix=27, msg="THIS VERSION IS INCOMPATIBLE. PLEASE UPGRADE TO 0.0-27 AT LEAST."},
{intro=nil, fix=28, msg="Sound loader only loads first half of 16-bit samples correctly"},
}

View File

@ -290,7 +290,7 @@ wav_t *wav_parse(char *buf, int len)
for(i = 0; i < datalen_smps; i++)
*(d++) = (((int16_t)(*s++))-0x80)<<8;
} else if(fmt.bps == 16) {
memcpy(wav->data, data_void, datalen_smps);
memcpy(wav->data, data_void, datalen_smps*2);
} else {
fprintf(stderr, "EDOOFUS: should never reach this point!\n");
abort();