58 return (adod ==
NULL) ||
68 TRACE(
"(%d)\n", dwDevID);
73 #define NUM_OF(a,b) ((a)/(b)) 76 #define PCM_RESAMPLE 1 99 {1, 8, 8000}, {2, 8, 8000}, {1, 16, 8000}, {2, 16, 8000}, {1, 24, 8000}, {2, 24, 8000},
100 {1, 8, 11025}, {2, 8, 11025}, {1, 16, 11025}, {2, 16, 11025}, {1, 24, 11025}, {2, 24, 11025},
101 {1, 8, 22050}, {2, 8, 22050}, {1, 16, 22050}, {2, 16, 22050}, {1, 24, 22050}, {2, 24, 22050},
102 {1, 8, 44100}, {2, 8, 44100}, {1, 16, 44100}, {2, 16, 44100}, {1, 24, 44100}, {2, 24, 44100},
103 {1, 8, 48000}, {2, 8, 48000}, {1, 16, 48000}, {2, 16, 48000}, {1, 24, 48000}, {2, 24, 48000},
104 {1, 8, 96000}, {2, 8, 96000}, {1, 16, 96000}, {2, 16, 96000}, {1, 24, 96000}, {2, 24, 96000},
113 TRACE(
"(%p)\n", wfx);
141 static inline short C816(
unsigned char b)
143 return (
b - 128) << 8;
151 static inline unsigned char C168(
short s)
161 static inline unsigned char C248(
int s)
181 static inline short R16(
const unsigned char*
src)
183 return (
short)((
unsigned short)
src[0] | ((
unsigned short)
src[1] << 8));
193 static inline int R24(
const unsigned char*
src)
195 return ((
int)
src[0] | (
int)
src[1] << 8 | (
int)
src[2] << 16) << 8;
203 static inline void W16(
unsigned char*
dst,
short s)
214 static inline void W24(
unsigned char*
dst,
int s)
232 if (
sum > 0x7fffff00)
234 else if (
sum < -0x7fffff00)
246 static inline short M16(
short l,
short r)
253 else if (
sum < -32768)
265 static inline unsigned char M8(
unsigned char a,
unsigned char b)
269 int sum = (
l +
r) + 128;
550 DWORD maxSrc = *nsrc, maxDst = *ndst;
552 for (*nsrc = 0; *nsrc < maxSrc; (*nsrc)++) {
554 while (
error > srcRate) {
571 DWORD maxSrc = *nsrc, maxDst = *ndst;
573 for (*nsrc = 0; *nsrc < maxSrc; (*nsrc)++) {
575 while (
error > srcRate) {
591 DWORD maxSrc = *nsrc, maxDst = *ndst;
593 for (*nsrc = 0; *nsrc < maxSrc; (*nsrc)++) {
595 while (
error > srcRate) {
612 DWORD maxSrc = *nsrc, maxDst = *ndst;
614 for (*nsrc = 0; *nsrc < maxSrc; (*nsrc)++) {
616 while (
error > srcRate) {
632 DWORD maxSrc = *nsrc, maxDst = *ndst;
634 for (*nsrc = 0; *nsrc < maxSrc; (*nsrc)++) {
636 while (
error > srcRate) {
653 DWORD maxSrc = *nsrc, maxDst = *ndst;
655 for (*nsrc = 0; *nsrc < maxSrc; (*nsrc)++) {
657 while (
error > srcRate) {
673 DWORD maxSrc = *nsrc, maxDst = *ndst;
675 for (*nsrc = 0; *nsrc < maxSrc; (*nsrc)++) {
677 while (
error > srcRate) {
694 DWORD maxSrc = *nsrc, maxDst = *ndst;
696 for (*nsrc = 0; *nsrc < maxSrc; (*nsrc)++) {
698 while (
error > srcRate) {
714 DWORD maxSrc = *nsrc, maxDst = *ndst;
716 for (*nsrc = 0; *nsrc < maxSrc; (*nsrc)++) {
718 while (
error > srcRate) {
735 DWORD maxSrc = *nsrc, maxDst = *ndst;
737 for (*nsrc = 0; *nsrc < maxSrc; (*nsrc)++) {
739 while (
error > srcRate) {
755 DWORD maxSrc = *nsrc, maxDst = *ndst;
757 for (*nsrc = 0; *nsrc < maxSrc; (*nsrc)++) {
759 while (
error > srcRate) {
776 DWORD maxSrc = *nsrc, maxDst = *ndst;
778 for (*nsrc = 0; *nsrc < maxSrc; (*nsrc)++) {
780 while (
error > srcRate) {
796 DWORD maxSrc = *nsrc, maxDst = *ndst;
798 for (*nsrc = 0; *nsrc < maxSrc; (*nsrc)++) {
800 while (
error > srcRate) {
817 DWORD maxSrc = *nsrc, maxDst = *ndst;
819 for (*nsrc = 0; *nsrc < maxSrc; (*nsrc)++) {
821 while (
error > srcRate) {
837 DWORD maxSrc = *nsrc, maxDst = *ndst;
839 for (*nsrc = 0; *nsrc < maxSrc; (*nsrc)++) {
841 while (
error > srcRate) {
858 DWORD maxSrc = *nsrc, maxDst = *ndst;
860 for (*nsrc = 0; *nsrc < maxSrc; (*nsrc)++) {
862 while (
error > srcRate) {
878 DWORD maxSrc = *nsrc, maxDst = *ndst;
880 for (*nsrc = 0; *nsrc < maxSrc; (*nsrc)++) {
882 while (
error > srcRate) {
899 DWORD maxSrc = *nsrc, maxDst = *ndst;
901 for (*nsrc = 0; *nsrc < maxSrc; (*nsrc)++) {
903 while (
error > srcRate) {
919 DWORD maxSrc = *nsrc, maxDst = *ndst;
921 for (*nsrc = 0; *nsrc < maxSrc; (*nsrc)++) {
923 while (
error > srcRate) {
940 DWORD maxSrc = *nsrc, maxDst = *ndst;
942 for (*nsrc = 0; *nsrc < maxSrc; (*nsrc)++) {
944 while (
error > srcRate) {
974 TRACE(
"(%p)\n", add);
1004 TRACE(
"(%p, %08x)\n", aftd, dwQuery);
1009 WARN(
"not possible\n");
1015 WARN(
"not possible\n");
1022 WARN(
"not possible\n");
1027 WARN(
"Unsupported query %08x\n", dwQuery);
1047 TRACE(
"(%p, %08x)\n", afd, dwQuery);
1052 WARN(
"not possible\n");
1071 WARN(
"Unsupported query %08x\n", dwQuery);
1089 TRACE(
"(%p)\n", adfs);
1095 WARN(
"not possible\n");
1123 WARN(
"not possible\n");
1144 TRACE(
"(%p)\n", adsi);
1157 FIXME(
"Source: 24-bit samples must be packed\n");
1175 FIXME(
"Destination: 24-bit samples must be packed\n");
1202 FIXME(
"Unimplemented conversion from %u -> %u bps\n",
1221 TRACE(
"(%p)\n", adsi);
1235 return ((
double)
a * (
double)
b + (
double)
c - 1) / (
double)
c;
1247 TRACE(
"(%p, %p)\n", adsi, adss);
1279 TRACE(
"(%p, %p)\n", adsi, adsh);
1283 TRACE(
"src [wFormatTag=%u, nChannels=%u, nSamplesPerSec=%u, nAvgBytesPerSec=%u, nBlockAlign=%u, wBitsPerSample=%u, cbSize=%u]\n",
1286 TRACE(
"dst [wFormatTag=%u, nChannels=%u, nSamplesPerSec=%u, nAvgBytesPerSec=%u, nBlockAlign=%u, wBitsPerSample=%u, cbSize=%u]\n",
1294 FIXME(
"Unsupported fdwConvert (%08x), ignoring it\n", adsh->
fdwConvert);
1310 if (nsrc < ndst) ndst = nsrc;
else nsrc = ndst;
1328 TRACE(
"(%08lx %p %u %08lx %08lx);\n",
1329 dwDevID, hDriv, wMsg, dwParam1, dwParam2);
1385 return DefDriverProc(dwDevID, hDriv, wMsg, dwParam1, dwParam2);
#define WAVE_FORMAT_UNKNOWN
PCM_CONVERT_KEEP_RATE cvtKeepRate
static void cvtMS816C(const DWORD srcRate, const unsigned char *src, DWORD *nsrc, const DWORD dstRate, unsigned char *dst, DWORD *ndst)
static void cvtSS248K(const unsigned char *src, int ns, unsigned char *dst)
static void cvtMM816K(const unsigned char *src, int ns, unsigned char *dst)
static short C816(unsigned char b)
#define ACM_STREAMSIZEF_DESTINATION
WCHAR szLongName[ACMDRIVERDETAILS_LONGNAME_CHARS]
static void cvtSS88K(const unsigned char *src, int ns, unsigned char *dst)
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
#define ACM_FORMATSUGGESTF_NSAMPLESPERSEC
static void cvtMM248K(const unsigned char *src, int ns, unsigned char *dst)
static unsigned char M8(unsigned char a, unsigned char b)
#define ACM_STREAMCONVERTF_BLOCKALIGN
static LRESULT PCM_StreamSize(PACMDRVSTREAMINSTANCE adsi, PACMDRVSTREAMSIZE adss)
static void cvtSS816C(const DWORD srcRate, const unsigned char *src, DWORD *nsrc, const DWORD dstRate, unsigned char *dst, DWORD *ndst)
static void cvtMS816K(const unsigned char *src, int ns, unsigned char *dst)
static void cvtMS88C(const DWORD srcRate, const unsigned char *src, DWORD *nsrc, const DWORD dstRate, unsigned char *dst, DWORD *ndst)
void(* PCM_CONVERT_CHANGE_RATE)(const DWORD, const unsigned char *, DWORD *, const DWORD, unsigned char *, DWORD *)
GLdouble GLdouble GLdouble r
static void cvtMS248K(const unsigned char *src, int ns, unsigned char *dst)
static void cvtSS168C(const DWORD srcRate, const unsigned char *src, DWORD *nsrc, const DWORD dstRate, unsigned char *dst, DWORD *ndst)
static void cvtMS1616K(const unsigned char *src, int ns, unsigned char *dst)
#define ACMDM_STREAM_RESET
#define ACM_FORMATSUGGESTF_WFORMATTAG
static void cvtMM88C(const DWORD srcRate, const unsigned char *src, DWORD *nsrc, const DWORD dstRate, unsigned char *dst, DWORD *ndst)
static LRESULT PCM_StreamConvert(PACMDRVSTREAMINSTANCE adsi, PACMDRVSTREAMHEADER adsh)
static void cvtSM168C(const DWORD srcRate, const unsigned char *src, DWORD *nsrc, const DWORD dstRate, unsigned char *dst, DWORD *ndst)
static const struct @466 PCM_Formats[]
static unsigned char C168(short s)
#define ACMDM_STREAM_OPEN
#define ACMDM_FORMATTAG_DETAILS
#define ACMDM_STREAM_PREPARE
struct pcmwaveformat_tag PCMWAVEFORMAT
static void cvtSS2416K(const unsigned char *src, int ns, unsigned char *dst)
static LRESULT PCM_StreamClose(PACMDRVSTREAMINSTANCE adsi)
#define ACM_STREAMCONVERTF_END
void(* PCM_CONVERT_KEEP_RATE)(const unsigned char *, int, unsigned char *)
static void cvtMS168K(const unsigned char *src, int ns, unsigned char *dst)
static void cvtMM816C(const DWORD srcRate, const unsigned char *src, DWORD *nsrc, const DWORD dstRate, unsigned char *dst, DWORD *ndst)
#define ACMDM_STREAM_CLOSE
#define DRV_QUERYCONFIGURE
static void cvtSM1616K(const unsigned char *src, int ns, unsigned char *dst)
#define ACMDM_DRIVER_NOTIFY
#define ACMDM_FORMAT_SUGGEST
unsigned short(__cdecl typeof(TIFFCurrentDirectory))(struct tiff *)
static short R16(const unsigned char *src)
LRESULT CALLBACK PCM_DriverProc(DWORD_PTR dwDevID, HDRVR hDriv, UINT wMsg, LPARAM dwParam1, LPARAM dwParam2)
static short C2416(int s)
#define ACM_FORMATDETAILSF_FORMAT
WCHAR szFeatures[ACMDRIVERDETAILS_FEATURES_CHARS]
static LRESULT PCM_StreamOpen(PACMDRVSTREAMINSTANCE adsi)
static int R24(const unsigned char *src)
#define ACMDM_DRIVER_DETAILS
struct tagAcmPcmData AcmPcmData
#define ACMDM_STREAM_CONVERT
static void cvtMM168C(const DWORD srcRate, const unsigned char *src, DWORD *nsrc, const DWORD dstRate, unsigned char *dst, DWORD *ndst)
static LRESULT PCM_FormatSuggest(PACMDRVFORMATSUGGEST adfs)
static void cvtMM88K(const unsigned char *src, int ns, unsigned char *dst)
static void cvtSM88C(const DWORD srcRate, const unsigned char *src, DWORD *nsrc, const DWORD dstRate, unsigned char *dst, DWORD *ndst)
static void cvtSM2416K(const unsigned char *src, int ns, unsigned char *dst)
static const char mbstate_t *static wchar_t const char mbstate_t *static const wchar_t int *static double
static DWORD PCM_GetFormatIndex(LPWAVEFORMATEX wfx)
static void cvtSM248K(const unsigned char *src, int ns, unsigned char *dst)
#define ACMDRIVERDETAILS_FCCCOMP_UNDEFINED
static LRESULT PCM_FormatDetails(PACMFORMATDETAILSW afd, DWORD dwQuery)
static void cvtSM1616C(const DWORD srcRate, const unsigned char *src, DWORD *nsrc, const DWORD dstRate, unsigned char *dst, DWORD *ndst)
#define ACM_FORMATSUGGESTF_NCHANNELS
static int sum(int x_, int y_)
#define ACMDM_HARDWARE_WAVE_CAPS_OUTPUT
#define ACMDM_HARDWARE_WAVE_CAPS_INPUT
GLboolean GLboolean GLboolean b
#define ACM_FORMATTAGDETAILSF_FORMATTAG
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
static const PCM_CONVERT_KEEP_RATE PCM_ConvertKeepRate[]
#define ACM_STREAMSIZEF_SOURCE
#define ACM_FORMATTAGDETAILSF_INDEX
PCM_CONVERT_CHANGE_RATE cvtChangeRate
WCHAR szShortName[ACMDRIVERDETAILS_SHORTNAME_CHARS]
static void cvtSS816K(const unsigned char *src, int ns, unsigned char *dst)
#define ACM_STREAMOPENF_ASYNC
#define ACMDRIVERDETAILS_SUPPORTF_CONVERTER
static void cvtMM2416K(const unsigned char *src, int ns, unsigned char *dst)
static DWORD PCM_drvClose(DWORD dwDevID)
#define MMSYSERR_NOTSUPPORTED
static void cvtMS2424C(const DWORD srcRate, const unsigned char *src, DWORD *nsrc, const DWORD dstRate, unsigned char *dst, DWORD *ndst)
static void cvtSS2424C(const DWORD srcRate, const unsigned char *src, DWORD *nsrc, const DWORD dstRate, unsigned char *dst, DWORD *ndst)
#define ACMDM_FILTERTAG_DETAILS
static void cvtSS88C(const DWORD srcRate, const unsigned char *src, DWORD *nsrc, const DWORD dstRate, unsigned char *dst, DWORD *ndst)
static const PCM_CONVERT_CHANGE_RATE PCM_ConvertChangeRate[]
#define memcpy(s1, s2, n)
#define ACM_FORMATTAGDETAILSF_LARGESTSIZE
#define ACMERR_NOTPOSSIBLE
static void cvtSM168K(const unsigned char *src, int ns, unsigned char *dst)
#define ACMDM_STREAM_UNPREPARE
static void cvtMM168K(const unsigned char *src, int ns, unsigned char *dst)
static short M16(short l, short r)
static unsigned char C248(int s)
static LRESULT PCM_FormatTagDetails(PACMFORMATTAGDETAILSW aftd, DWORD dwQuery)
static void cvtSS168K(const unsigned char *src, int ns, unsigned char *dst)
#define ACM_STREAMCONVERTF_START
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
static void cvtMS2416K(const unsigned char *src, int ns, unsigned char *dst)
static void cvtSS1616K(const unsigned char *src, int ns, unsigned char *dst)
static void cvtMS168C(const DWORD srcRate, const unsigned char *src, DWORD *nsrc, const DWORD dstRate, unsigned char *dst, DWORD *ndst)
static void cvtSM816K(const unsigned char *src, int ns, unsigned char *dst)
#define MultiByteToWideChar
WINE_DEFAULT_DEBUG_CHANNEL(msacm)
#define ACM_FORMATDETAILSF_INDEX
static void cvtSM816C(const DWORD srcRate, const unsigned char *src, DWORD *nsrc, const DWORD dstRate, unsigned char *dst, DWORD *ndst)
static void cvtMM1616K(const unsigned char *src, int ns, unsigned char *dst)
static void W24(unsigned char *dst, int s)
WCHAR szLicensing[ACMDRIVERDETAILS_LICENSING_CHARS]
WCHAR szCopyright[ACMDRIVERDETAILS_COPYRIGHT_CHARS]
static void cvtMS88K(const unsigned char *src, int ns, unsigned char *dst)
LRESULT WINAPI DefDriverProc(DWORD_PTR dwDriverIdentifier, HDRVR hDrv, UINT Msg, LPARAM lParam1, LPARAM lParam2)
static void cvtMM1616C(const DWORD srcRate, const unsigned char *src, DWORD *nsrc, const DWORD dstRate, unsigned char *dst, DWORD *ndst)
static LRESULT PCM_DriverDetails(PACMDRIVERDETAILSW add)
GLboolean GLboolean GLboolean GLboolean a
union tagAcmPcmData::@467 cvt
static void W16(unsigned char *dst, short s)
static void cvtSM88K(const unsigned char *src, int ns, unsigned char *dst)
static void cvtMM2424C(const DWORD srcRate, const unsigned char *src, DWORD *nsrc, const DWORD dstRate, unsigned char *dst, DWORD *ndst)
#define HeapFree(x, y, z)
#define ACM_FORMATSUGGESTF_WBITSPERSAMPLE
static void cvtSM2424C(const DWORD srcRate, const unsigned char *src, DWORD *nsrc, const DWORD dstRate, unsigned char *dst, DWORD *ndst)
static DWORD PCM_drvOpen(LPCSTR str, PACMDRVOPENDESCW adod)
#define ACMDM_FORMAT_DETAILS
static int M24(int l, int r)
int WINAPI MessageBoxA(_In_opt_ HWND hWnd, _In_opt_ LPCSTR lpText, _In_opt_ LPCSTR lpCaption, _In_ UINT uType)
static DWORD PCM_round(DWORD a, DWORD b, DWORD c)
static void cvtMS1616C(const DWORD srcRate, const unsigned char *src, DWORD *nsrc, const DWORD dstRate, unsigned char *dst, DWORD *ndst)
#define ACMDRIVERDETAILS_FCCTYPE_AUDIOCODEC
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
static void cvtSS1616C(const DWORD srcRate, const unsigned char *src, DWORD *nsrc, const DWORD dstRate, unsigned char *dst, DWORD *ndst)
#define ACMDM_STREAM_SIZE
#define ACMDM_FILTER_DETAILS