improved sound encoding, thanks nop90
This commit is contained in:
parent
06b18f3c64
commit
7402ac40fb
2 changed files with 4 additions and 5 deletions
|
@ -1,6 +1,5 @@
|
||||||
@echo off
|
@echo off
|
||||||
echo Building 3DSX/ELF/SMDH...
|
echo Building 3DSX/ELF/SMDH...
|
||||||
set mypath=%cd%
|
|
||||||
make
|
make
|
||||||
echo Creating banner...
|
echo Creating banner...
|
||||||
bannertool.exe makebanner -i icons-banners/banner.png -a icons-banners/audio.wav -o icons-banners/banner.bnr
|
bannertool.exe makebanner -i icons-banners/banner.png -a icons-banners/audio.wav -o icons-banners/banner.bnr
|
||||||
|
|
|
@ -8,9 +8,9 @@ void loadSound(Sound * snd, char * filename){
|
||||||
FILE *file = fopen(filename, "rb");
|
FILE *file = fopen(filename, "rb");
|
||||||
if(file != NULL){
|
if(file != NULL){
|
||||||
fseek(file, 0, SEEK_END);
|
fseek(file, 0, SEEK_END);
|
||||||
snd->size = ftell(file);
|
snd->size = ftell(file)/2;
|
||||||
fseek(file, 0, SEEK_SET);
|
fseek(file, 0, SEEK_SET);
|
||||||
snd->buffer = linearAlloc(snd->size);
|
snd->buffer = linearAlloc(snd->size*sizeof(u16));
|
||||||
fread(snd->buffer, 1, snd->size, file);
|
fread(snd->buffer, 1, snd->size, file);
|
||||||
}
|
}
|
||||||
fclose(file);
|
fclose(file);
|
||||||
|
|
Loading…
Add table
Reference in a new issue