git-svn-id: https://svn.eduke32.com/eduke32@648 1a8010ca-5511-0410-912e-c29ae57300e0

This commit is contained in:
terminx 2008-03-18 11:07:36 +00:00
parent 43a7dc4d33
commit bee008fbc5
4 changed files with 19 additions and 19 deletions

View file

@ -428,12 +428,12 @@ typedef struct {
short camerasprite,last_camsprite;
short last_level,secretlevel;
char overhead_on,last_overhead,showweapons;
char god,warp_on,cashman,eog,showallmap;
char show_help,scrollmode,clipping;
char ridecule[10][40];
char savegame[10][22];
char pwlockout[128],rtsname[128];
char overhead_on,last_overhead,showweapons;
config_t config;
} user_defs;

View file

@ -97,13 +97,13 @@ typedef enum
KeepPlaying
} playbackstatus;
typedef struct sounddef
{
unsigned pos;
char *ptrsnd;
unsigned size;
OggVorbis_File oggStream;
} sounddef;
typedef struct sounddef
{
unsigned pos;
char *ptrsnd;
unsigned size;
OggVorbis_File oggStream;
} sounddef;
typedef struct VoiceNode
{
@ -140,7 +140,7 @@ typedef struct VoiceNode
void (*DemandFeed)(char **ptr, unsigned int *length);
struct sounddef OGGstream;
sounddef OGGstream;
// char *bufsnd;
char bufsnd[0x8000*4];
int downsample;

View file

@ -1763,8 +1763,8 @@ size_t ReadOgg(void *ptr, size_t size1, size_t nmemb, void *datasource)
{
sounddef *d=(sounddef *)datasource;
size1*=nmemb;
if (d->pos>=d->size)
return 0;
/* if (d->pos>=d->size)
return 0;*/
if (d->pos+size1>=d->size)
size1=d->size-d->pos;
Bmemcpy(ptr,(d->ptrsnd+d->pos),size1);
@ -1784,12 +1784,12 @@ int SeekOgg(void *datasource,ogg_int64_t offset,int whence)
whence=d->pos+offset;
break;
case SEEK_END:
whence=d->size-offset-1;
whence=d->size-offset;
break;
default: return -1;
}
if (whence>=(int)d->size||whence<0)
return -1;
/* if (whence>=(int)d->size||whence<0)
return -1;*/
d->pos=whence;
return 0;
}
@ -2443,16 +2443,16 @@ int MV_PlayLoopedOGG(char *ptr, int loopstart, int loopend, int pitchoffset, int
MV_SetErrorCode(MV_InvalidOGGFile);
return(MV_Error);
}
while ((ogg_int64_t)(vorbisInfo->rate)/(1<<voice->downsample)*PITCH_GetScale(pitchoffset)/0x1000000/0x100)
voice->downsample++;
length=ov_pcm_total(&voice->OGGstream.oggStream,-1);
// if (!length)length=0xffffff;
if (length == OV_EINVAL)
if (!length)
length=0xffffff;
/* if (length == OV_EINVAL)
{
MV_SetErrorCode(MV_InvalidOGGFile);
return(MV_Error);
}
}*/
loopend=length=length>>voice->downsample;

View file

@ -401,7 +401,7 @@ void cacheit(void)
if (ud.recstat == 2)
return;
MUSIC_StopSong();
// MUSIC_StopSong();
playmusicMAP(&env_music_fn[2][0],MAXVOLUMES*MAXLEVELS+2); // loadmus
starttime = getticks();