ReactOS  0.4.15-dev-507-g90aff8d
synth_8bit.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int SYNTH_NAME (real *bandPtr, int channel, mpg123_handle *fr, int final)
 
int MONO_NAME (real *bandPtr, mpg123_handle *fr)
 
int MONO2STEREO_NAME (real *bandPtr, mpg123_handle *fr)
 

Function Documentation

◆ MONO2STEREO_NAME()

int MONO2STEREO_NAME ( real bandPtr,
mpg123_handle fr 
)

Definition at line 62 of file synth_8bit.h.

63 {
64  short samples_tmp[BLOCK];
65  short *tmp1 = samples_tmp;
66  int i,ret;
67 
68  unsigned char *samples = fr->buffer.data;
69  int pnt = fr->buffer.fill;
70  fr->buffer.data = (unsigned char*) samples_tmp;
71  fr->buffer.fill = 0;
72  ret = BASE_SYNTH_NAME(bandPtr, 0, fr, 0);
73  fr->buffer.data = samples;
74 
75  samples += pnt;
76  for(i=0;i<(BLOCK/2);i++)
77  {
78  *samples++ = fr->conv16to8[*tmp1>>AUSHIFT];
79  *samples++ = fr->conv16to8[*tmp1>>AUSHIFT];
80  tmp1 += 2;
81  }
82  fr->buffer.fill = pnt + BLOCK;
83 
84  return ret;
85 }
GLsizei samples
Definition: glext.h:7006
struct outbuffer buffer
Definition: frame.h:267
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define BLOCK
Definition: synth.c:1138
unsigned char * conv16to8
Definition: frame.h:135
#define BASE_SYNTH_NAME
Definition: synth_8bit.c:50
#define AUSHIFT
int ret

◆ MONO_NAME()

int MONO_NAME ( real bandPtr,
mpg123_handle fr 
)

Definition at line 38 of file synth_8bit.h.

39 {
40  short samples_tmp[BLOCK];
41  short *tmp1 = samples_tmp;
42  int i,ret;
43 
44  unsigned char *samples = fr->buffer.data;
45  int pnt = fr->buffer.fill;
46  fr->buffer.data = (unsigned char*) samples_tmp;
47  fr->buffer.fill = 0;
48  ret = BASE_SYNTH_NAME(bandPtr, 0, fr, 0);
49  fr->buffer.data = samples;
50 
51  samples += pnt;
52  for(i=0;i<(BLOCK/2);i++)
53  {
54  *samples++ = fr->conv16to8[*tmp1>>AUSHIFT];
55  tmp1+=2;
56  }
57  fr->buffer.fill = pnt + BLOCK/2;
58 
59  return ret;
60 }
GLsizei samples
Definition: glext.h:7006
struct outbuffer buffer
Definition: frame.h:267
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define BLOCK
Definition: synth.c:1138
unsigned char * conv16to8
Definition: frame.h:135
#define BASE_SYNTH_NAME
Definition: synth_8bit.c:50
#define AUSHIFT
int ret

◆ SYNTH_NAME()

int SYNTH_NAME ( real bandPtr,
int  channel,
mpg123_handle fr,
int  final 
)

Definition at line 13 of file synth_8bit.h.

14 {
15  short samples_tmp[BLOCK];
16  short *tmp1 = samples_tmp + channel;
17  int i,ret;
18 
19  unsigned char *samples = fr->buffer.data;
20  int pnt = fr->buffer.fill;
21  fr->buffer.data = (unsigned char*) samples_tmp;
22  fr->buffer.fill = 0;
23  ret = BASE_SYNTH_NAME(bandPtr, channel, fr , 0);
24  fr->buffer.data = samples;
25 
26  samples += channel + pnt;
27  for(i=0;i<(BLOCK/2);i++)
28  {
29  *samples = fr->conv16to8[*tmp1>>AUSHIFT];
30  samples += 2;
31  tmp1 += 2;
32  }
33  fr->buffer.fill = pnt + (final ? BLOCK : 0 );
34 
35  return ret;
36 }
GLsizei samples
Definition: glext.h:7006
struct outbuffer buffer
Definition: frame.h:267
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define BLOCK
Definition: synth.c:1138
unsigned char * conv16to8
Definition: frame.h:135
#define BASE_SYNTH_NAME
Definition: synth_8bit.c:50
#define AUSHIFT
int ret