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 Building 3DSX/ELF/SMDH...
|
||||
set mypath=%cd%
|
||||
make
|
||||
echo Creating banner...
|
||||
bannertool.exe makebanner -i icons-banners/banner.png -a icons-banners/audio.wav -o icons-banners/banner.bnr
|
||||
|
|
|
@ -8,10 +8,10 @@ void loadSound(Sound * snd, char * filename){
|
|||
FILE *file = fopen(filename, "rb");
|
||||
if(file != NULL){
|
||||
fseek(file, 0, SEEK_END);
|
||||
snd->size = ftell(file);
|
||||
fseek(file, 0, SEEK_SET);
|
||||
snd->buffer = linearAlloc(snd->size);
|
||||
fread(snd->buffer, 1, snd->size, file);
|
||||
snd->size = ftell(file)/2;
|
||||
fseek(file, 0, SEEK_SET);
|
||||
snd->buffer = linearAlloc(snd->size*sizeof(u16));
|
||||
fread(snd->buffer, 1, snd->size, file);
|
||||
}
|
||||
fclose(file);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue