Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 285 → Rev 286

/programs/media/ac97snd/trunk/ac97.sln
8,6 → 8,9
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pow_test", "pow_test\pow_test.vcproj", "{9FE40739-2ADC-4241-8182-20E1B3C661A7}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ac97", "ac97\ac97.vcproj", "{1C94A897-DA4F-45B2-B8A6-B97AD837828E}"
ProjectSection(ProjectDependencies) = postProject
{CF807B93-2860-41DF-A4D2-5B92B52DFD96} = {CF807B93-2860-41DF-A4D2-5B92B52DFD96}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mpg", "mpg\mpg.vcproj", "{CF807B93-2860-41DF-A4D2-5B92B52DFD96}"
EndProject
/programs/media/ac97snd/trunk/ac97wav.c
183,7 → 183,7
touch(outbuf, outremain);
make_decode_tables(32767);
init_layer2();
init_layer3(SBLIMIT);
init_layer3(32);
fr.single = -1;
};
 
266,14 → 266,21
int totalout;
int outcount;
 
set_reader(&rd, first_sync);
// memset(&fr,0,sizeof(fr));
fr.down_sample_sblimit = 32;
fr.single = -1;
reset_mpg();
 
outPtr = outbuf;
totalout=0;
done = 0;
outremain=0x40000;
 
memset(outbuf,0,0x10000);
SetBuffer(hSound,hBuff,outbuf,0,0x10000);
memset(outbuf,0,0x40000);
 
set_reader(&rd, 0); //;first_sync);
SetBuffer(hSound,hBuff,outbuf,0,0x8000);
SetBuffer(hSound,hBuff,outbuf,0x8000,0x8000);
PlayBuffer(hSound, hBuff);
 
while(1)
339,6 → 346,7
 
// read_file (fname,outbuf,offset,32*1024,0);
// offset+=32*1024;
set_reader(&rd,44);
stream_read_raw(&rd,outbuf,32768);
SetBuffer(hSound,hBuff,outbuf,0,0x8000);
stream_read_raw(&rd,outbuf,32768);
/programs/media/ac97snd/trunk/crt.h
4,7 → 4,7
typedef unsigned __int32 size_t;
 
 
extern char *__argv;
extern char *__argv[2];
 
void crtStartUp();
int __cdecl _purecall();
/programs/media/ac97snd/trunk/mpg/decode_i386.c
133,12 → 133,22
return ret;
}
 
 
static real buffs[2][2][0x110];
static const int step = 2;
static int bo = 1;
 
void init_dct()
{
bo = 1;
memset(buffs,0, sizeof(buffs));
 
};
 
 
int synth_1to1(real *bandPtr,int channel,unsigned char *out,int *pnt)
{
#ifndef PENTIUM_OPT
static real buffs[2][2][0x110];
static const int step = 2;
static int bo = 1;
short *samples = (short *) (out + *pnt);
 
real *b0,(*buf)[0x110];
/programs/media/ac97snd/trunk/mpg/layer3.c
220,6 → 220,20
* init tables for layer-3
*/
 
real hybridIn [2][SBLIMIT][SSLIMIT];
real hybridOut[2][SSLIMIT][SBLIMIT];
static real block[2][2][SBLIMIT*SSLIMIT] = { { { 0, } } };
static int blc[2]={0,0};
 
void reset_mpg()
{
memset(block,0,sizeof(block));
blc[0]=0;
blc[1]=0;
init_dct();
};
 
 
#pragma warning(disable:4244)
void init_layer3(int down_sample_sblimit)
{
601,7 → 615,7
int i,j,n=0,numbits=0;
unsigned int slen;
 
static unsigned char stab[3][6][4] = {
static const unsigned char stab[3][6][4] = {
{ { 6, 5, 5,5 } , { 6, 5, 7,3 } , { 11,10,0,0} ,
{ 7, 7, 7,0 } , { 6, 6, 6,3 } , { 8, 8,5,0} } ,
{ { 9, 9, 9,9 } , { 9, 9,12,6 } , { 18,18,0,0} ,
1727,9 → 1741,6
int ch,struct gr_info_s *gr_info)
#endif
{
static real block[2][2][SBLIMIT*SSLIMIT] = { { { 0, } } };
static int blc[2]={0,0};
 
real *tspnt = (real *) tsOut;
real *rawout1,*rawout2;
int bt,sb = 0;
1782,9 → 1793,6
}
}
 
real hybridIn [2][SBLIMIT][SSLIMIT];
real hybridOut[2][SSLIMIT][SBLIMIT];
int do_layer3(struct frame *fr,byte *pcm_sample,int *pcm_point)
{
int gr, ch, ss,clip=0;
/programs/media/ac97snd/trunk/mpg/mpg123.h
352,7 → 352,8
int __stdcall set_reader(struct reader *rd, unsigned int filepos);
double pow_test(double, double);
void * __cdecl mem_cpy(void * dst,const void * src,size_t count);
 
void init_dct();
void reset_mpg();
#ifdef __cplusplus
}
#endif
/programs/media/ac97snd/trunk/mpg/readers.c
112,6 → 112,15
rd->strremain=bytes;
rd->filepos=filepos+bytes;
rd->strpos = 0;
fsizeold=0;
firsthead=0;
bsbufold = 0;
bsbuf = bsspace[1];
bsnum = 0;
ssize=0;
oldhead=0;
memset(bsspace,0,sizeof(bsspace));
return 1;
};
715,8 → 724,8
}
 
 
#if 0
 
#if 0
static int stream_back_bytes(struct reader *rds, off_t bytes)
{
if(stream_lseek(rds,-bytes,SEEK_CUR) < 0)