74 {1, 8, 8000}, {2, 8, 8000}, {1, 16, 8000}, {2, 16, 8000},
75 {1, 8, 11025}, {2, 8, 11025}, {1, 16, 11025}, {2, 16, 11025},
76 {1, 8, 22050}, {2, 8, 22050}, {1, 16, 22050}, {2, 16, 22050},
77 {1, 8, 44100}, {2, 8, 44100}, {1, 16, 44100}, {2, 16, 44100},
82 {1, 4, 8000}, {2, 4, 8000}, {1, 4, 11025}, {2, 4, 11025},
83 {1, 4, 22050}, {2, 4, 22050}, {1, 4, 44100}, {2, 4, 44100},
88 230, 230, 230, 230, 307, 409, 512, 614,
89 768, 614, 512, 409, 307, 230, 230, 230
95 {256, 0}, {512, -256}, {0, 0}, {192, 64}, {240, 0}, {460, -208}, {392, -232}
120 for (
i = 0;
i < hi;
i++)
182static inline short R16(
const unsigned char*
src)
184 return (
short)((
unsigned short)
src[0] | ((
unsigned short)
src[1] << 8));
192static inline void W16(
unsigned char*
dst,
short s)
200 if (*sample < -32768) *sample = -32768;
201 if (*sample > 32767) *sample = 32767;
205 int* sample1,
int* sample2,
212 snibble = (nibble & 0x08) ? (nibble - 16) : nibble;
213 sample = ((*sample1 * coeff->
iCoef1) + (*sample2 * coeff->
iCoef2)) / 256 +
219 *idelta = ((
MS_Delta[nibble] * *idelta) / 256);
220 if (*idelta < 16) *idelta = 16;
223static inline unsigned char C168(
short s)
232 int ideltaL, ideltaR;
233 int sample1L, sample2L;
234 int sample1R, sample2R;
245 for (; nblock > 0; nblock--)
247 const unsigned char* in_src =
src;
251 if (*
src > 6 || *(
src + 1) > 6)
256 WARN(
"Invalid ADPCM data, stopping conversion\n");
276 for (nsamp = nsamp_blk; nsamp > 0; nsamp--)
290 for (nsamp = nsamp_blk; nsamp > 0; nsamp--)
307 int sample1, sample2;
318 for (; nblock > 0; nblock--)
320 const unsigned char* in_src =
src;
334 for (nsamp = nsamp_blk; nsamp > 0; nsamp -= 2)
345 for (nsamp = nsamp_blk; nsamp > 0; nsamp -= 2)
407 static const WCHAR szPcm[]={
'P',
'C',
'M',0};
408 static const WCHAR szMsAdPcm[]={
'M',
'i',
'c',
'r',
'o',
's',
'o',
'f',
't',
' ',
'A',
'D',
'P',
'C',
'M',0};
431 WARN(
"Unsupported query %08x\n", dwQuery);
497 WARN(
"Unsupported query %08x\n", dwQuery);
606 FIXME(
"spb=%u\n", nspb);
612 if (((nspb - 1) & 3) != 0)
goto theEnd;
633 FIXME(
"spb=%u\n", nspb);
639 if (((nspb - 1) & 3) != 0)
goto theEnd;
650 FIXME(
"We don't support encoding yet\n");
681 WORD wSamplesPerBlock;
763 FIXME(
"Unsupported fdwConvert (%08x), ignoring it\n", adsh->
fdwConvert);
788 TRACE(
"(%08lx %p %04x %08lx %08lx);\n",
789 dwDevID, hDriv, wMsg, dwParam1, dwParam2);
847 return DefDriverProc(dwDevID, hDriv, wMsg, dwParam1, dwParam2);
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
#define WAVE_FORMAT_ADPCM
#define HeapFree(x, y, z)
#define MultiByteToWideChar
unsigned short(__cdecl typeof(TIFFCurrentDirectory))(struct tiff *)
LRESULT WINAPI DefDriverProc(DWORD_PTR dwDriverIdentifier, HDRVR hDrv, UINT Msg, LPARAM lParam1, LPARAM lParam2)
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
#define memcpy(s1, s2, n)
#define WAVE_FORMAT_UNKNOWN
struct adpcmcoef_tag ADPCMCOEFSET
#define MM_MSFT_ACM_MSADPCM
struct adpcmwaveformat_tag ADPCMWAVEFORMAT
#define DRV_QUERYCONFIGURE
#define MMSYSERR_NOTSUPPORTED
struct pcmwaveformat_tag PCMWAVEFORMAT
#define MMSYSERR_INVALPARAM
#define ACM_STREAMCONVERTF_START
#define ACM_FORMATTAGDETAILSF_FORMATTAG
#define ACM_STREAMCONVERTF_BLOCKALIGN
#define ACM_STREAMOPENF_ASYNC
#define ACMDRIVERDETAILS_FCCCOMP_UNDEFINED
#define ACM_FORMATSUGGESTF_WFORMATTAG
#define ACM_FORMATSUGGESTF_NCHANNELS
#define ACMERR_NOTPOSSIBLE
#define ACM_FORMATDETAILSF_FORMAT
#define ACM_STREAMSIZEF_SOURCE
#define ACM_FORMATTAGDETAILSF_LARGESTSIZE
#define ACM_STREAMSIZEF_DESTINATION
#define ACM_FORMATDETAILSF_INDEX
#define ACM_FORMATTAGDETAILSF_INDEX
#define ACM_FORMATSUGGESTF_WBITSPERSAMPLE
#define ACM_STREAMCONVERTF_END
#define ACMDRIVERDETAILS_FCCTYPE_AUDIOCODEC
#define ACMDRIVERDETAILS_SUPPORTF_CODEC
#define ACM_FORMATSUGGESTF_NSAMPLESPERSEC
#define ACMDM_STREAM_PREPARE
#define ACMDM_STREAM_CLOSE
#define ACMDM_STREAM_CONVERT
#define ACMDM_FORMAT_SUGGEST
#define ACMDM_FILTER_DETAILS
#define ACMDM_HARDWARE_WAVE_CAPS_INPUT
#define ACMDM_DRIVER_NOTIFY
#define ACMDM_FORMAT_DETAILS
#define ACMDM_STREAM_SIZE
#define ACMDM_FILTERTAG_DETAILS
#define ACMDM_HARDWARE_WAVE_CAPS_OUTPUT
#define ACMDM_FORMATTAG_DETAILS
#define ACMDM_STREAM_UNPREPARE
#define ACMDM_STREAM_OPEN
#define ACMDM_DRIVER_DETAILS
#define ACMDM_STREAM_RESET
static void init_wfx_adpcm(ADPCMWAVEFORMAT *awfx)
LRESULT CALLBACK ADPCM_DriverProc(DWORD_PTR dwDevID, HDRVR hDriv, UINT wMsg, LPARAM dwParam1, LPARAM dwParam2)
struct tagAcmAdpcmData AcmAdpcmData
static LRESULT ADPCM_FormatSuggest(PACMDRVFORMATSUGGEST adfs)
static void cvtSSms16K(const ACMDRVSTREAMINSTANCE *adsi, const unsigned char *src, LPDWORD nsrc, unsigned char *dst, LPDWORD ndst)
static LRESULT ADPCM_StreamClose(PACMDRVSTREAMINSTANCE adsi)
static const Format ADPCM_Formats[]
static ADPCMCOEFSET MSADPCM_CoeffSet[]
static LRESULT ADPCM_StreamOpen(PACMDRVSTREAMINSTANCE adsi)
static unsigned char C168(short s)
static LRESULT ADPCM_drvOpen(LPCSTR str)
static void ADPCM_Reset(PACMDRVSTREAMINSTANCE adsi, AcmAdpcmData *aad)
static LRESULT ADPCM_FormatTagDetails(PACMFORMATTAGDETAILSW aftd, DWORD dwQuery)
static void clamp_sample(int *sample)
static void W16(unsigned char *dst, short s)
static void process_nibble(unsigned nibble, int *idelta, int *sample1, int *sample2, const ADPCMCOEFSET *coeff)
static LRESULT ADPCM_DriverDetails(PACMDRIVERDETAILSW add)
static LRESULT ADPCM_StreamSize(const ACMDRVSTREAMINSTANCE *adsi, PACMDRVSTREAMSIZE adss)
static LRESULT ADPCM_StreamConvert(PACMDRVSTREAMINSTANCE adsi, PACMDRVSTREAMHEADER adsh)
static DWORD ADPCM_GetFormatIndex(const WAVEFORMATEX *wfx)
static LRESULT ADPCM_drvClose(DWORD_PTR dwDevID)
static const Format PCM_Formats[]
static LRESULT ADPCM_FormatDetails(PACMFORMATDETAILSW afd, DWORD dwQuery)
static short R16(const unsigned char *src)
static void cvtMMms16K(const ACMDRVSTREAMINSTANCE *adsi, const unsigned char *src, LPDWORD nsrc, unsigned char *dst, LPDWORD ndst)
WCHAR szCopyright[ACMDRIVERDETAILS_COPYRIGHT_CHARS]
WCHAR szLongName[ACMDRIVERDETAILS_LONGNAME_CHARS]
WCHAR szShortName[ACMDRIVERDETAILS_SHORTNAME_CHARS]
WCHAR szLicensing[ACMDRIVERDETAILS_LICENSING_CHARS]
WCHAR szFeatures[ACMDRIVERDETAILS_FEATURES_CHARS]
void(* convert)(PACMDRVSTREAMINSTANCE adsi, const unsigned char *, LPDWORD, unsigned char *, LPDWORD)
int WINAPI MessageBoxA(_In_opt_ HWND hWnd, _In_opt_ LPCSTR lpText, _In_opt_ LPCSTR lpCaption, _In_ UINT uType)