mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-01 00:28:18 +00:00
hxcmod-player: Avoid playback error on platforms where char is unsigned
This commit is contained in:
parent
8a7f815b85
commit
afc6fe184c
4
3rd-party/hxcmod-player/hxcmod.c
vendored
4
3rd-party/hxcmod-player/hxcmod.c
vendored
@ -231,7 +231,7 @@ static void worknote( note * nptr, hxcmod_channel * cptr,char t,modcontext * mod
|
||||
|
||||
if( period || _sample )
|
||||
{
|
||||
cptr->sampdata =(char *) mod->sampledata[cptr->sampnum];
|
||||
cptr->sampdata = mod->sampledata[cptr->sampnum];
|
||||
cptr->length = mod->song.samples[cptr->sampnum].length;
|
||||
cptr->reppnt = mod->song.samples[cptr->sampnum].reppnt;
|
||||
cptr->replen = mod->song.samples[cptr->sampnum].replen;
|
||||
@ -984,7 +984,7 @@ int hxcmod_load( modcontext * modctx, void * mod_data, int mod_data_size )
|
||||
|
||||
if (sptr->length == 0) continue;
|
||||
|
||||
modctx->sampledata[i] = (char*)modmemory;
|
||||
modctx->sampledata[i] = (mchar*)modmemory;
|
||||
modmemory += sptr->length;
|
||||
|
||||
if (sptr->replen + sptr->reppnt > sptr->length)
|
||||
|
5
3rd-party/hxcmod-player/hxcmod.h
vendored
5
3rd-party/hxcmod-player/hxcmod.h
vendored
@ -30,6 +30,7 @@ extern "C" {
|
||||
|
||||
// Basic type
|
||||
typedef unsigned char muchar;
|
||||
typedef signed char mchar;
|
||||
typedef unsigned short muint;
|
||||
typedef short mint;
|
||||
typedef unsigned long mulong;
|
||||
@ -75,7 +76,7 @@ typedef struct {
|
||||
// HxCMod Internal structures
|
||||
//
|
||||
typedef struct {
|
||||
char * sampdata;
|
||||
mchar * sampdata;
|
||||
muint sampnum;
|
||||
muint length;
|
||||
muint reppnt;
|
||||
@ -112,7 +113,7 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
module song;
|
||||
char * sampledata[31];
|
||||
mchar * sampledata[31];
|
||||
note * patterndata[128];
|
||||
|
||||
mulong playrate;
|
||||
|
Loading…
Reference in New Issue
Block a user