ReactOS 0.4.16-dev-257-g6aa11ac
synth_mono.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

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 49 of file synth_mono.h.

50{
51 int i,ret;
52 unsigned char *samples = fr->buffer.data;
53
54 ret = SYNTH_NAME(bandPtr,0,fr,1);
55 samples += fr->buffer.fill - BLOCK*sizeof(SAMPLE_T);
56
57 for(i=0;i<(BLOCK/2);i++)
58 {
59 ((SAMPLE_T *)samples)[1] = ((SAMPLE_T *)samples)[0];
60 samples+=2*sizeof(SAMPLE_T);
61 }
62
63 return ret;
64}
GLsizei samples
Definition: glext.h:7006
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
struct outbuffer buffer
Definition: frame.h:267
#define SYNTH_NAME
Definition: synth.c:1180
#define SAMPLE_T
Definition: synth.c:24
#define BLOCK
Definition: synth.c:1138
int ret

◆ MONO_NAME()

int MONO_NAME ( real bandPtr,
mpg123_handle fr 
)

Definition at line 21 of file synth_mono.h.

22{
23 SAMPLE_T samples_tmp[BLOCK];
24 SAMPLE_T *tmp1 = samples_tmp;
25 int i,ret;
26
27 /* save buffer stuff, trick samples_tmp into there, decode, restore */
28 unsigned char *samples = fr->buffer.data;
29 int pnt = fr->buffer.fill;
30 fr->buffer.data = (unsigned char*) samples_tmp;
31 fr->buffer.fill = 0;
32 ret = SYNTH_NAME(bandPtr, 0, fr, 0); /* decode into samples_tmp */
33 fr->buffer.data = samples; /* restore original value */
34
35 /* now append samples from samples_tmp */
36 samples += pnt; /* just the next mem in frame buffer */
37 for(i=0;i<(BLOCK/2);i++)
38 {
39 *( (SAMPLE_T *)samples) = *tmp1;
40 samples += sizeof(SAMPLE_T);
41 tmp1 += 2;
42 }
43 fr->buffer.fill = pnt + (BLOCK/2)*sizeof(SAMPLE_T);
44
45 return ret;
46}