Removed trailing white space.

This commit is contained in:
Patrik Stridvall 2002-08-28 23:43:43 +00:00 committed by Alexandre Julliard
parent 440b021592
commit 1ee88a2bfb
11 changed files with 94 additions and 102 deletions

View File

@ -1,5 +1,5 @@
/* /*
* Mpeg Layer-1,2,3 audio decoder * Mpeg Layer-1,2,3 audio decoder
* ------------------------------ * ------------------------------
* copyright (c) 1995,1996,1997 by Michael Hipp, All rights reserved. * copyright (c) 1995,1996,1997 by Michael Hipp, All rights reserved.
* See also 'README' * See also 'README'
@ -67,7 +67,7 @@ int synth_1to1(real *bandPtr,int channel,unsigned char *out,int *pnt)
short *samples = (short *) (out + *pnt); short *samples = (short *) (out + *pnt);
real *b0,(*buf)[0x110]; real *b0,(*buf)[0x110];
int clip = 0; int clip = 0;
int bo1; int bo1;
bo = gmp->synth_bo; bo = gmp->synth_bo;
@ -94,7 +94,7 @@ int synth_1to1(real *bandPtr,int channel,unsigned char *out,int *pnt)
} }
gmp->synth_bo = bo; gmp->synth_bo = bo;
{ {
register int j; register int j;
real *window = decwin + 16 - bo1; real *window = decwin + 16 - bo1;

View File

@ -51,9 +51,9 @@ static DWORD MPEG3_drvClose(DWORD dwDevID)
return 1; return 1;
} }
typedef struct tagAcmMpeg3Data typedef struct tagAcmMpeg3Data
{ {
void (*convert)(PACMDRVSTREAMINSTANCE adsi, void (*convert)(PACMDRVSTREAMINSTANCE adsi,
const unsigned char*, LPDWORD, unsigned char*, LPDWORD); const unsigned char*, LPDWORD, unsigned char*, LPDWORD);
struct mpstr mp; struct mpstr mp;
} AcmMpeg3Data; } AcmMpeg3Data;
@ -61,14 +61,14 @@ typedef struct tagAcmMpeg3Data
/* table to list all supported formats... those are the basic ones. this /* table to list all supported formats... those are the basic ones. this
* also helps given a unique index to each of the supported formats * also helps given a unique index to each of the supported formats
*/ */
typedef struct typedef struct
{ {
int nChannels; int nChannels;
int nBits; int nBits;
int rate; int rate;
} Format; } Format;
static Format PCM_Formats[] = static Format PCM_Formats[] =
{ {
{1, 8, 8000}, {2, 8, 8000}, {1, 16, 8000}, {2, 16, 8000}, {1, 8, 8000}, {2, 8, 8000}, {1, 16, 8000}, {2, 16, 8000},
{1, 8, 11025}, {2, 8, 11025}, {1, 16, 11025}, {2, 16, 11025}, {1, 8, 11025}, {2, 8, 11025}, {1, 16, 11025}, {2, 16, 11025},
@ -76,9 +76,9 @@ static Format PCM_Formats[] =
{1, 8, 44100}, {2, 8, 44100}, {1, 16, 44100}, {2, 16, 44100}, {1, 8, 44100}, {2, 8, 44100}, {1, 16, 44100}, {2, 16, 44100},
}; };
static Format MPEG3_Formats[] = static Format MPEG3_Formats[] =
{ {
{1, 0, 8000}, {2, 0, 8000}, {1, 0, 11025}, {2, 0, 11025}, {1, 0, 8000}, {2, 0, 8000}, {1, 0, 11025}, {2, 0, 11025},
{1, 0, 22050}, {2, 0, 22050}, {1, 0, 44100}, {2, 0, 44100}, {1, 0, 22050}, {2, 0, 22050}, {1, 0, 44100}, {2, 0, 44100},
}; };
@ -92,8 +92,8 @@ static DWORD MPEG3_GetFormatIndex(LPWAVEFORMATEX wfx)
{ {
int i, hi; int i, hi;
Format* fmts; Format* fmts;
switch (wfx->wFormatTag) switch (wfx->wFormatTag)
{ {
case WAVE_FORMAT_PCM: case WAVE_FORMAT_PCM:
hi = NUM_PCM_FORMATS; hi = NUM_PCM_FORMATS;
@ -106,15 +106,15 @@ static DWORD MPEG3_GetFormatIndex(LPWAVEFORMATEX wfx)
default: default:
return 0xFFFFFFFF; return 0xFFFFFFFF;
} }
for (i = 0; i < hi; i++) for (i = 0; i < hi; i++)
{ {
if (wfx->nChannels == fmts[i].nChannels && if (wfx->nChannels == fmts[i].nChannels &&
wfx->nSamplesPerSec == fmts[i].rate && wfx->nSamplesPerSec == fmts[i].rate &&
wfx->wBitsPerSample == fmts[i].nBits) wfx->wBitsPerSample == fmts[i].nBits)
return i; return i;
} }
return 0xFFFFFFFF; return 0xFFFFFFFF;
} }
@ -156,7 +156,7 @@ static void mp3_horse(PACMDRVSTREAMINSTANCE adsi,
do { do {
dpos += size; dpos += size;
if (*ndst - dpos < 4608) break; if (*ndst - dpos < 4608) break;
ret = decodeMP3(&amd->mp, NULL, 0, ret = decodeMP3(&amd->mp, NULL, 0,
dst + dpos, *ndst - dpos, &size); dst + dpos, *ndst - dpos, &size);
} while (ret == MP3_OK); } while (ret == MP3_OK);
*ndst = dpos; *ndst = dpos;
@ -187,7 +187,7 @@ static LRESULT MPEG3_DriverDetails(PACMDRIVERDETAILSW add)
MultiByteToWideChar( CP_ACP, 0, "Refer to LICENSE file", -1, MultiByteToWideChar( CP_ACP, 0, "Refer to LICENSE file", -1,
add->szLicensing, sizeof(add->szLicensing)/sizeof(WCHAR) ); add->szLicensing, sizeof(add->szLicensing)/sizeof(WCHAR) );
add->szFeatures[0] = 0; add->szFeatures[0] = 0;
return MMSYSERR_NOERROR; return MMSYSERR_NOERROR;
} }
@ -199,21 +199,21 @@ static LRESULT MPEG3_FormatTagDetails(PACMFORMATTAGDETAILSW aftd, DWORD dwQuery)
{ {
static WCHAR szPcm[]={'P','C','M',0}; static WCHAR szPcm[]={'P','C','M',0};
static WCHAR szMpeg3[]={'M','P','e','g','3',0}; static WCHAR szMpeg3[]={'M','P','e','g','3',0};
switch (dwQuery) switch (dwQuery)
{ {
case ACM_FORMATTAGDETAILSF_INDEX: case ACM_FORMATTAGDETAILSF_INDEX:
if (aftd->dwFormatTagIndex >= 2) return ACMERR_NOTPOSSIBLE; if (aftd->dwFormatTagIndex >= 2) return ACMERR_NOTPOSSIBLE;
break; break;
case ACM_FORMATTAGDETAILSF_LARGESTSIZE: case ACM_FORMATTAGDETAILSF_LARGESTSIZE:
if (aftd->dwFormatTag == WAVE_FORMAT_UNKNOWN) if (aftd->dwFormatTag == WAVE_FORMAT_UNKNOWN)
{ {
aftd->dwFormatTagIndex = 1; /* WAVE_FORMAT_MPEGLAYER3 is bigger than PCM */ aftd->dwFormatTagIndex = 1; /* WAVE_FORMAT_MPEGLAYER3 is bigger than PCM */
break; break;
} }
/* fall thru */ /* fall thru */
case ACM_FORMATTAGDETAILSF_FORMATTAG: case ACM_FORMATTAGDETAILSF_FORMATTAG:
switch (aftd->dwFormatTag) switch (aftd->dwFormatTag)
{ {
case WAVE_FORMAT_PCM: aftd->dwFormatTagIndex = 0; break; case WAVE_FORMAT_PCM: aftd->dwFormatTagIndex = 0; break;
case WAVE_FORMAT_MPEGLAYER3: aftd->dwFormatTagIndex = 1; break; case WAVE_FORMAT_MPEGLAYER3: aftd->dwFormatTagIndex = 1; break;
@ -224,9 +224,9 @@ static LRESULT MPEG3_FormatTagDetails(PACMFORMATTAGDETAILSW aftd, DWORD dwQuery)
WARN("Unsupported query %08lx\n", dwQuery); WARN("Unsupported query %08lx\n", dwQuery);
return MMSYSERR_NOTSUPPORTED; return MMSYSERR_NOTSUPPORTED;
} }
aftd->fdwSupport = ACMDRIVERDETAILS_SUPPORTF_CODEC; aftd->fdwSupport = ACMDRIVERDETAILS_SUPPORTF_CODEC;
switch (aftd->dwFormatTagIndex) switch (aftd->dwFormatTagIndex)
{ {
case 0: case 0:
aftd->dwFormatTag = WAVE_FORMAT_PCM; aftd->dwFormatTag = WAVE_FORMAT_PCM;
@ -267,14 +267,14 @@ static void fill_in_wfx(unsigned cbwfx, WAVEFORMATEX* wfx, unsigned bit_rate)
*/ */
static LRESULT MPEG3_FormatDetails(PACMFORMATDETAILSW afd, DWORD dwQuery) static LRESULT MPEG3_FormatDetails(PACMFORMATDETAILSW afd, DWORD dwQuery)
{ {
switch (dwQuery) switch (dwQuery)
{ {
case ACM_FORMATDETAILSF_FORMAT: case ACM_FORMATDETAILSF_FORMAT:
if (MPEG3_GetFormatIndex(afd->pwfx) == 0xFFFFFFFF) return ACMERR_NOTPOSSIBLE; if (MPEG3_GetFormatIndex(afd->pwfx) == 0xFFFFFFFF) return ACMERR_NOTPOSSIBLE;
break; break;
case ACM_FORMATDETAILSF_INDEX: case ACM_FORMATDETAILSF_INDEX:
afd->pwfx->wFormatTag = afd->dwFormatTag; afd->pwfx->wFormatTag = afd->dwFormatTag;
switch (afd->dwFormatTag) switch (afd->dwFormatTag)
{ {
case WAVE_FORMAT_PCM: case WAVE_FORMAT_PCM:
if (afd->dwFormatIndex >= NUM_PCM_FORMATS) return ACMERR_NOTPOSSIBLE; if (afd->dwFormatIndex >= NUM_PCM_FORMATS) return ACMERR_NOTPOSSIBLE;
@ -282,11 +282,11 @@ static LRESULT MPEG3_FormatDetails(PACMFORMATDETAILSW afd, DWORD dwQuery)
afd->pwfx->nSamplesPerSec = PCM_Formats[afd->dwFormatIndex].rate; afd->pwfx->nSamplesPerSec = PCM_Formats[afd->dwFormatIndex].rate;
afd->pwfx->wBitsPerSample = PCM_Formats[afd->dwFormatIndex].nBits; afd->pwfx->wBitsPerSample = PCM_Formats[afd->dwFormatIndex].nBits;
/* native MSACM uses a PCMWAVEFORMAT structure, so cbSize is not accessible /* native MSACM uses a PCMWAVEFORMAT structure, so cbSize is not accessible
* afd->pwfx->cbSize = 0; * afd->pwfx->cbSize = 0;
*/ */
afd->pwfx->nBlockAlign = afd->pwfx->nBlockAlign =
(afd->pwfx->nChannels * afd->pwfx->wBitsPerSample) / 8; (afd->pwfx->nChannels * afd->pwfx->wBitsPerSample) / 8;
afd->pwfx->nAvgBytesPerSec = afd->pwfx->nAvgBytesPerSec =
afd->pwfx->nSamplesPerSec * afd->pwfx->nBlockAlign; afd->pwfx->nSamplesPerSec * afd->pwfx->nBlockAlign;
break; break;
case WAVE_FORMAT_MPEGLAYER3: case WAVE_FORMAT_MPEGLAYER3:
@ -304,11 +304,11 @@ static LRESULT MPEG3_FormatDetails(PACMFORMATDETAILSW afd, DWORD dwQuery)
break; break;
default: default:
WARN("Unsupported query %08lx\n", dwQuery); WARN("Unsupported query %08lx\n", dwQuery);
return MMSYSERR_NOTSUPPORTED; return MMSYSERR_NOTSUPPORTED;
} }
afd->fdwSupport = ACMDRIVERDETAILS_SUPPORTF_CODEC; afd->fdwSupport = ACMDRIVERDETAILS_SUPPORTF_CODEC;
afd->szFormat[0] = 0; /* let MSACM format this for us... */ afd->szFormat[0] = 0; /* let MSACM format this for us... */
return MMSYSERR_NOERROR; return MMSYSERR_NOERROR;
} }
@ -330,21 +330,21 @@ static LRESULT MPEG3_FormatSuggest(PACMDRVFORMATSUGGEST adfs)
if (!(adfs->fdwSuggest & ACM_FORMATSUGGESTF_NSAMPLESPERSEC)) if (!(adfs->fdwSuggest & ACM_FORMATSUGGESTF_NSAMPLESPERSEC))
adfs->pwfxDst->nSamplesPerSec = adfs->pwfxSrc->nSamplesPerSec; adfs->pwfxDst->nSamplesPerSec = adfs->pwfxSrc->nSamplesPerSec;
if (!(adfs->fdwSuggest & ACM_FORMATSUGGESTF_WBITSPERSAMPLE)) if (!(adfs->fdwSuggest & ACM_FORMATSUGGESTF_WBITSPERSAMPLE))
{ {
if (adfs->pwfxSrc->wFormatTag == WAVE_FORMAT_PCM) if (adfs->pwfxSrc->wFormatTag == WAVE_FORMAT_PCM)
adfs->pwfxDst->wBitsPerSample = 4; adfs->pwfxDst->wBitsPerSample = 4;
else else
adfs->pwfxDst->wBitsPerSample = 16; adfs->pwfxDst->wBitsPerSample = 16;
} }
if (!(adfs->fdwSuggest & ACM_FORMATSUGGESTF_WFORMATTAG)) if (!(adfs->fdwSuggest & ACM_FORMATSUGGESTF_WFORMATTAG))
{ {
if (adfs->pwfxSrc->wFormatTag == WAVE_FORMAT_PCM) if (adfs->pwfxSrc->wFormatTag == WAVE_FORMAT_PCM)
adfs->pwfxDst->wFormatTag = WAVE_FORMAT_MPEGLAYER3; adfs->pwfxDst->wFormatTag = WAVE_FORMAT_MPEGLAYER3;
else else
adfs->pwfxDst->wFormatTag = WAVE_FORMAT_PCM; adfs->pwfxDst->wFormatTag = WAVE_FORMAT_PCM;
} }
/* check if result is ok */ /* check if result is ok */
if (MPEG3_GetFormatIndex(adfs->pwfxDst) == 0xFFFFFFFF) return ACMERR_NOTPOSSIBLE; if (MPEG3_GetFormatIndex(adfs->pwfxDst) == 0xFFFFFFFF) return ACMERR_NOTPOSSIBLE;
@ -384,25 +384,25 @@ static LRESULT MPEG3_StreamOpen(PACMDRVSTREAMINSTANCE adsi)
AcmMpeg3Data* aad; AcmMpeg3Data* aad;
assert(!(adsi->fdwOpen & ACM_STREAMOPENF_ASYNC)); assert(!(adsi->fdwOpen & ACM_STREAMOPENF_ASYNC));
if (MPEG3_GetFormatIndex(adsi->pwfxSrc) == 0xFFFFFFFF || if (MPEG3_GetFormatIndex(adsi->pwfxSrc) == 0xFFFFFFFF ||
MPEG3_GetFormatIndex(adsi->pwfxDst) == 0xFFFFFFFF) MPEG3_GetFormatIndex(adsi->pwfxDst) == 0xFFFFFFFF)
return ACMERR_NOTPOSSIBLE; return ACMERR_NOTPOSSIBLE;
aad = HeapAlloc(GetProcessHeap(), 0, sizeof(AcmMpeg3Data)); aad = HeapAlloc(GetProcessHeap(), 0, sizeof(AcmMpeg3Data));
if (aad == 0) return MMSYSERR_NOMEM; if (aad == 0) return MMSYSERR_NOMEM;
adsi->dwDriver = (DWORD)aad; adsi->dwDriver = (DWORD)aad;
if (adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_PCM && if (adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_PCM &&
adsi->pwfxDst->wFormatTag == WAVE_FORMAT_PCM) adsi->pwfxDst->wFormatTag == WAVE_FORMAT_PCM)
{ {
goto theEnd; goto theEnd;
} }
else if (adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_MPEGLAYER3 && else if (adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_MPEGLAYER3 &&
adsi->pwfxDst->wFormatTag == WAVE_FORMAT_PCM) adsi->pwfxDst->wFormatTag == WAVE_FORMAT_PCM)
{ {
/* resampling or mono <=> stereo not available /* resampling or mono <=> stereo not available
* MPEG3 algo only define 16 bit per sample output * MPEG3 algo only define 16 bit per sample output
*/ */
if (adsi->pwfxSrc->nSamplesPerSec != adsi->pwfxDst->nSamplesPerSec || if (adsi->pwfxSrc->nSamplesPerSec != adsi->pwfxDst->nSamplesPerSec ||
@ -414,13 +414,13 @@ static LRESULT MPEG3_StreamOpen(PACMDRVSTREAMINSTANCE adsi)
} }
/* no encoding yet /* no encoding yet
else if (adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_PCM && else if (adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_PCM &&
adsi->pwfxDst->wFormatTag == WAVE_FORMAT_MPEGLAYER3) adsi->pwfxDst->wFormatTag == WAVE_FORMAT_MPEGLAYER3)
*/ */
else goto theEnd; else goto theEnd;
MPEG3_Reset(adsi, aad); MPEG3_Reset(adsi, aad);
return MMSYSERR_NOERROR; return MMSYSERR_NOERROR;
theEnd: theEnd:
HeapFree(GetProcessHeap(), 0, aad); HeapFree(GetProcessHeap(), 0, aad);
adsi->dwDriver = 0L; adsi->dwDriver = 0L;
@ -455,23 +455,23 @@ static inline DWORD MPEG3_round(DWORD a, DWORD b, DWORD c)
*/ */
static LRESULT MPEG3_StreamSize(PACMDRVSTREAMINSTANCE adsi, PACMDRVSTREAMSIZE adss) static LRESULT MPEG3_StreamSize(PACMDRVSTREAMINSTANCE adsi, PACMDRVSTREAMSIZE adss)
{ {
switch (adss->fdwSize) switch (adss->fdwSize)
{ {
case ACM_STREAMSIZEF_DESTINATION: case ACM_STREAMSIZEF_DESTINATION:
/* cbDstLength => cbSrcLength */ /* cbDstLength => cbSrcLength */
if (adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_PCM && if (adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_PCM &&
adsi->pwfxDst->wFormatTag == WAVE_FORMAT_MPEGLAYER3) adsi->pwfxDst->wFormatTag == WAVE_FORMAT_MPEGLAYER3)
{ {
/* don't take block overhead into account, doesn't matter too much */ /* don't take block overhead into account, doesn't matter too much */
adss->cbSrcLength = adss->cbDstLength * 4; adss->cbSrcLength = adss->cbDstLength * 4;
} }
else if (adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_MPEGLAYER3 && else if (adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_MPEGLAYER3 &&
adsi->pwfxDst->wFormatTag == WAVE_FORMAT_PCM) adsi->pwfxDst->wFormatTag == WAVE_FORMAT_PCM)
{ {
FIXME("misses the block header overhead\n"); FIXME("misses the block header overhead\n");
adss->cbSrcLength = 256 + adss->cbDstLength / 4; adss->cbSrcLength = 256 + adss->cbDstLength / 4;
} }
else else
{ {
return MMSYSERR_NOTSUPPORTED; return MMSYSERR_NOTSUPPORTED;
} }
@ -479,25 +479,25 @@ static LRESULT MPEG3_StreamSize(PACMDRVSTREAMINSTANCE adsi, PACMDRVSTREAMSIZE ad
case ACM_STREAMSIZEF_SOURCE: case ACM_STREAMSIZEF_SOURCE:
/* cbSrcLength => cbDstLength */ /* cbSrcLength => cbDstLength */
if (adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_PCM && if (adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_PCM &&
adsi->pwfxDst->wFormatTag == WAVE_FORMAT_MPEGLAYER3) adsi->pwfxDst->wFormatTag == WAVE_FORMAT_MPEGLAYER3)
{ {
FIXME("misses the block header overhead\n"); FIXME("misses the block header overhead\n");
adss->cbDstLength = 256 + adss->cbSrcLength / 4; adss->cbDstLength = 256 + adss->cbSrcLength / 4;
} }
else if (adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_MPEGLAYER3 && else if (adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_MPEGLAYER3 &&
adsi->pwfxDst->wFormatTag == WAVE_FORMAT_PCM) adsi->pwfxDst->wFormatTag == WAVE_FORMAT_PCM)
{ {
/* don't take block overhead into account, doesn't matter too much */ /* don't take block overhead into account, doesn't matter too much */
adss->cbDstLength = adss->cbSrcLength * 4; adss->cbDstLength = adss->cbSrcLength * 4;
} }
else else
{ {
return MMSYSERR_NOTSUPPORTED; return MMSYSERR_NOTSUPPORTED;
} }
break; break;
default: default:
WARN("Unsupported query %08lx\n", adss->fdwSize); WARN("Unsupported query %08lx\n", adss->fdwSize);
return MMSYSERR_NOTSUPPORTED; return MMSYSERR_NOTSUPPORTED;
} }
return MMSYSERR_NOERROR; return MMSYSERR_NOERROR;
} }
@ -511,11 +511,11 @@ static LRESULT MPEG3_StreamConvert(PACMDRVSTREAMINSTANCE adsi, PACMDRVSTREAMHEAD
AcmMpeg3Data* aad = (AcmMpeg3Data*)adsi->dwDriver; AcmMpeg3Data* aad = (AcmMpeg3Data*)adsi->dwDriver;
DWORD nsrc = adsh->cbSrcLength; DWORD nsrc = adsh->cbSrcLength;
DWORD ndst = adsh->cbDstLength; DWORD ndst = adsh->cbDstLength;
if (adsh->fdwConvert & if (adsh->fdwConvert &
~(ACM_STREAMCONVERTF_BLOCKALIGN| ~(ACM_STREAMCONVERTF_BLOCKALIGN|
ACM_STREAMCONVERTF_END| ACM_STREAMCONVERTF_END|
ACM_STREAMCONVERTF_START)) ACM_STREAMCONVERTF_START))
{ {
FIXME("Unsupported fdwConvert (%08lx), ignoring it\n", adsh->fdwConvert); FIXME("Unsupported fdwConvert (%08lx), ignoring it\n", adsh->fdwConvert);
} }
@ -524,7 +524,7 @@ static LRESULT MPEG3_StreamConvert(PACMDRVSTREAMINSTANCE adsi, PACMDRVSTREAMHEAD
* ACM_STREAMCONVERTF_END * ACM_STREAMCONVERTF_END
* no pending data, so do nothing for this flag * no pending data, so do nothing for this flag
*/ */
if ((adsh->fdwConvert & ACM_STREAMCONVERTF_START)) if ((adsh->fdwConvert & ACM_STREAMCONVERTF_START))
{ {
MPEG3_Reset(adsi, aad); MPEG3_Reset(adsi, aad);
} }
@ -532,60 +532,60 @@ static LRESULT MPEG3_StreamConvert(PACMDRVSTREAMINSTANCE adsi, PACMDRVSTREAMHEAD
aad->convert(adsi, adsh->pbSrc, &nsrc, adsh->pbDst, &ndst); aad->convert(adsi, adsh->pbSrc, &nsrc, adsh->pbDst, &ndst);
adsh->cbSrcLengthUsed = nsrc; adsh->cbSrcLengthUsed = nsrc;
adsh->cbDstLengthUsed = ndst; adsh->cbDstLengthUsed = ndst;
return MMSYSERR_NOERROR; return MMSYSERR_NOERROR;
} }
/************************************************************************** /**************************************************************************
* MPEG3_DriverProc [exported] * MPEG3_DriverProc [exported]
*/ */
LRESULT CALLBACK MPEG3_DriverProc(DWORD dwDevID, HDRVR hDriv, UINT wMsg, LRESULT CALLBACK MPEG3_DriverProc(DWORD dwDevID, HDRVR hDriv, UINT wMsg,
LPARAM dwParam1, LPARAM dwParam2) LPARAM dwParam1, LPARAM dwParam2)
{ {
TRACE("(%08lx %08lx %04x %08lx %08lx);\n", TRACE("(%08lx %08lx %04x %08lx %08lx);\n",
dwDevID, (DWORD)hDriv, wMsg, dwParam1, dwParam2); dwDevID, (DWORD)hDriv, wMsg, dwParam1, dwParam2);
switch (wMsg) switch (wMsg)
{ {
case DRV_LOAD: return 1; case DRV_LOAD: return 1;
case DRV_FREE: return 1; case DRV_FREE: return 1;
case DRV_OPEN: return MPEG3_drvOpen((LPSTR)dwParam1); case DRV_OPEN: return MPEG3_drvOpen((LPSTR)dwParam1);
case DRV_CLOSE: return MPEG3_drvClose(dwDevID); case DRV_CLOSE: return MPEG3_drvClose(dwDevID);
case DRV_ENABLE: return 1; case DRV_ENABLE: return 1;
case DRV_DISABLE: return 1; case DRV_DISABLE: return 1;
case DRV_QUERYCONFIGURE: return 1; case DRV_QUERYCONFIGURE: return 1;
case DRV_CONFIGURE: MessageBoxA(0, "MPEG3 filter !", "Wine Driver", MB_OK); return 1; case DRV_CONFIGURE: MessageBoxA(0, "MPEG3 filter !", "Wine Driver", MB_OK); return 1;
case DRV_INSTALL: return DRVCNF_RESTART; case DRV_INSTALL: return DRVCNF_RESTART;
case DRV_REMOVE: return DRVCNF_RESTART; case DRV_REMOVE: return DRVCNF_RESTART;
case ACMDM_DRIVER_NOTIFY: case ACMDM_DRIVER_NOTIFY:
/* no caching from other ACM drivers is done so far */ /* no caching from other ACM drivers is done so far */
return MMSYSERR_NOERROR; return MMSYSERR_NOERROR;
case ACMDM_DRIVER_DETAILS: case ACMDM_DRIVER_DETAILS:
return MPEG3_DriverDetails((PACMDRIVERDETAILSW)dwParam1); return MPEG3_DriverDetails((PACMDRIVERDETAILSW)dwParam1);
case ACMDM_FORMATTAG_DETAILS: case ACMDM_FORMATTAG_DETAILS:
return MPEG3_FormatTagDetails((PACMFORMATTAGDETAILSW)dwParam1, dwParam2); return MPEG3_FormatTagDetails((PACMFORMATTAGDETAILSW)dwParam1, dwParam2);
case ACMDM_FORMAT_DETAILS: case ACMDM_FORMAT_DETAILS:
return MPEG3_FormatDetails((PACMFORMATDETAILSW)dwParam1, dwParam2); return MPEG3_FormatDetails((PACMFORMATDETAILSW)dwParam1, dwParam2);
case ACMDM_FORMAT_SUGGEST: case ACMDM_FORMAT_SUGGEST:
return MPEG3_FormatSuggest((PACMDRVFORMATSUGGEST)dwParam1); return MPEG3_FormatSuggest((PACMDRVFORMATSUGGEST)dwParam1);
case ACMDM_STREAM_OPEN: case ACMDM_STREAM_OPEN:
return MPEG3_StreamOpen((PACMDRVSTREAMINSTANCE)dwParam1); return MPEG3_StreamOpen((PACMDRVSTREAMINSTANCE)dwParam1);
case ACMDM_STREAM_CLOSE: case ACMDM_STREAM_CLOSE:
return MPEG3_StreamClose((PACMDRVSTREAMINSTANCE)dwParam1); return MPEG3_StreamClose((PACMDRVSTREAMINSTANCE)dwParam1);
case ACMDM_STREAM_SIZE: case ACMDM_STREAM_SIZE:
return MPEG3_StreamSize((PACMDRVSTREAMINSTANCE)dwParam1, (PACMDRVSTREAMSIZE)dwParam2); return MPEG3_StreamSize((PACMDRVSTREAMINSTANCE)dwParam1, (PACMDRVSTREAMSIZE)dwParam2);
case ACMDM_STREAM_CONVERT: case ACMDM_STREAM_CONVERT:
return MPEG3_StreamConvert((PACMDRVSTREAMINSTANCE)dwParam1, (PACMDRVSTREAMHEADER)dwParam2); return MPEG3_StreamConvert((PACMDRVSTREAMINSTANCE)dwParam1, (PACMDRVSTREAMHEADER)dwParam2);
case ACMDM_HARDWARE_WAVE_CAPS_INPUT: case ACMDM_HARDWARE_WAVE_CAPS_INPUT:
case ACMDM_HARDWARE_WAVE_CAPS_OUTPUT: case ACMDM_HARDWARE_WAVE_CAPS_OUTPUT:
/* this converter is not a hardware driver */ /* this converter is not a hardware driver */
@ -599,7 +599,7 @@ LRESULT CALLBACK MPEG3_DriverProc(DWORD dwDevID, HDRVR hDriv, UINT wMsg,
case ACMDM_STREAM_UNPREPARE: case ACMDM_STREAM_UNPREPARE:
/* nothing special to do here... so don't do anything */ /* nothing special to do here... so don't do anything */
return MMSYSERR_NOERROR; return MMSYSERR_NOERROR;
default: default:
return DefDriverProc(dwDevID, hDriv, wMsg, dwParam1, dwParam2); return DefDriverProc(dwDevID, hDriv, wMsg, dwParam1, dwParam2);
} }

View File

@ -689,8 +689,8 @@ DecodeDateTime(char **field, int *ftype, int nf,
tm->tm_mon = 11; /* December, as tm_mon is 0..11 */ tm->tm_mon = 11; /* December, as tm_mon is 0..11 */
tm->tm_mday = 30; tm->tm_mday = 30;
} }
#ifdef DATEDEBUG #ifdef DATEDEBUG
printf("DecodeDateTime- mask %08x (%08x)", fmask, DTK_DATE_M); printf("DecodeDateTime- mask %08x (%08x)", fmask, DTK_DATE_M);
printf(" set y%04d m%02d d%02d", tm->tm_year, (tm->tm_mon+1), tm->tm_mday); printf(" set y%04d m%02d d%02d", tm->tm_year, (tm->tm_mon+1), tm->tm_mday);
@ -1344,6 +1344,3 @@ datebsearch(char *key, datetkn *base, unsigned int nel)
} }
return NULL; return NULL;
} }

View File

@ -615,7 +615,7 @@ RTFFont *fp;
rtfClass = rtfText; rtfClass = rtfText;
return; return;
} }
/* first check for pushed token from RTFUngetToken() */ /* first check for pushed token from RTFUngetToken() */
if (pushedClass >= 0) if (pushedClass >= 0)

View File

@ -124,7 +124,7 @@ TextClass ()
char buf[rtfBufSiz]; char buf[rtfBufSiz];
TRACE("\n"); TRACE("\n");
if (rtfFormat == SF_TEXT) if (rtfFormat == SF_TEXT)
PutLitChar (rtfMajor); PutLitChar (rtfMajor);
else if (rtfMinor != rtfSC_nothing) else if (rtfMinor != rtfSC_nothing)

View File

@ -230,7 +230,7 @@ static void EMS_map_multiple( CONTEXT86 *context )
for(i=0; i<CX_reg(context) && !status; i++, ptr += 2) for(i=0; i<CX_reg(context) && !status; i++, ptr += 2)
switch(AL_reg(context)) { switch(AL_reg(context)) {
case 0x00: case 0x00:
status = EMS_map( ptr[1], status = EMS_map( ptr[1],
DX_reg(context), ptr[0] ); DX_reg(context), ptr[0] );
break; break;
case 0x01: case 0x01:
@ -238,7 +238,7 @@ static void EMS_map_multiple( CONTEXT86 *context )
DX_reg(context), ptr[0] ); DX_reg(context), ptr[0] );
break; break;
default: default:
status = 0x8f; /* status: undefined subfunction */ status = 0x8f; /* status: undefined subfunction */
} }
AH_reg(context) = status; AH_reg(context) = status;
@ -292,7 +292,7 @@ static void EMS_save_context( CONTEXT86 *context )
EMS_record->mapping_save_area[h][i].hindex = EMS_record->mapping[i].hindex; EMS_record->mapping_save_area[h][i].hindex = EMS_record->mapping[i].hindex;
EMS_record->mapping_save_area[h][i].logical_page = EMS_record->mapping[i].logical_page; EMS_record->mapping_save_area[h][i].logical_page = EMS_record->mapping[i].logical_page;
} }
AX_reg(context) = 0; /* status: ok */ AX_reg(context) = 0; /* status: ok */
} }
@ -316,8 +316,8 @@ static void EMS_restore_context( CONTEXT86 *context )
return; return;
} }
} }
AX_reg(context) = 0; /* status: ok */ AX_reg(context) = 0; /* status: ok */
} }
/********************************************************************** /**********************************************************************
@ -370,7 +370,7 @@ void WINAPI DOSVM_Int67Handler( CONTEXT86 *context )
break; break;
case 0x47: /* EMS - SAVE MAPPING CONTEXT */ case 0x47: /* EMS - SAVE MAPPING CONTEXT */
EMS_init(); EMS_init();
EMS_save_context(context); EMS_save_context(context);
break; break;
@ -423,7 +423,7 @@ void WINAPI DOSVM_Int67Handler( CONTEXT86 *context )
if(AL_reg(context) == 0x01) { if(AL_reg(context) == 0x01) {
EMS_init(); EMS_init();
/* unallocated raw pages */ /* unallocated raw pages */
BX_reg(context) = EMS_MAX_PAGES - EMS_record->used_pages; BX_reg(context) = EMS_MAX_PAGES - EMS_record->used_pages;
/* total number raw pages */ /* total number raw pages */
DX_reg(context) = EMS_MAX_PAGES; DX_reg(context) = EMS_MAX_PAGES;
/* status: ok */ /* status: ok */

View File

@ -41,7 +41,7 @@ static void get_download_name(PSDRV_PDEVICE *physDev, LPOUTLINETEXTMETRICA
len = strlen((char*)potm + (ptrdiff_t)potm->otmpFullName) + 1; len = strlen((char*)potm + (ptrdiff_t)potm->otmpFullName) + 1;
*str = HeapAlloc(GetProcessHeap(),0,len); *str = HeapAlloc(GetProcessHeap(),0,len);
strcpy(*str, (char*)potm + (ptrdiff_t)potm->otmpFullName); strcpy(*str, (char*)potm + (ptrdiff_t)potm->otmpFullName);
p = *str; p = *str;
while((p = strchr(p, ' '))) while((p = strchr(p, ' ')))
*p = '_'; *p = '_';
@ -55,7 +55,7 @@ static void get_download_name(PSDRV_PDEVICE *physDev, LPOUTLINETEXTMETRICA
static DOWNLOAD *is_font_downloaded(PSDRV_PDEVICE *physDev, char *ps_name) static DOWNLOAD *is_font_downloaded(PSDRV_PDEVICE *physDev, char *ps_name)
{ {
DOWNLOAD *pdl; DOWNLOAD *pdl;
for(pdl = physDev->downloaded_fonts; pdl; pdl = pdl->next) for(pdl = physDev->downloaded_fonts; pdl; pdl = pdl->next)
if(!strcmp(pdl->ps_name, ps_name)) if(!strcmp(pdl->ps_name, ps_name))
break; break;

View File

@ -257,11 +257,11 @@ void HTTP_CloseHTTPSessionHandle(LPWININETHTTPSESSIONA lpwhs);
void HTTP_CloseHTTPRequestHandle(LPWININETHTTPREQA lpwhr); void HTTP_CloseHTTPRequestHandle(LPWININETHTTPREQA lpwhr);
VOID SendAsyncCallback(LPWININETAPPINFOA hIC, HINTERNET hHttpSession, VOID SendAsyncCallback(LPWININETAPPINFOA hIC, HINTERNET hHttpSession,
DWORD dwContext, DWORD dwInternetStatus, LPVOID DWORD dwContext, DWORD dwInternetStatus, LPVOID
lpvStatusInfo , DWORD dwStatusInfoLength); lpvStatusInfo , DWORD dwStatusInfoLength);
VOID SendAsyncCallbackInt(LPWININETAPPINFOA hIC, HINTERNET hHttpSession, VOID SendAsyncCallbackInt(LPWININETAPPINFOA hIC, HINTERNET hHttpSession,
DWORD dwContext, DWORD dwInternetStatus, LPVOID DWORD dwContext, DWORD dwInternetStatus, LPVOID
lpvStatusInfo , DWORD dwStatusInfoLength); lpvStatusInfo , DWORD dwStatusInfoLength);

View File

@ -37,7 +37,7 @@ typedef struct IDragSourceHelper IDragSourceHelper,*LPDRAGSOURCEHELPER;
/***************************************************************************** /*****************************************************************************
* IDragSourceHelper interface * IDragSourceHelper interface
*/ */
typedef struct { typedef struct {
SIZE sizeDragImage; SIZE sizeDragImage;
POINT ptOffset; POINT ptOffset;
@ -98,8 +98,3 @@ ICOM_DEFINE(IDropTargetHelper,IUnknown)
#endif /* defined(__cplusplus) */ #endif /* defined(__cplusplus) */
#endif /* __WINE_WINE_OBJ_DRAGDROPHELPER_H */ #endif /* __WINE_WINE_OBJ_DRAGDROPHELPER_H */

View File

@ -19,7 +19,7 @@
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* *
* This version deliberately differs in error handling compared to the * This version deliberately differs in error handling compared to the
* windows version. * windows version.
*/ */
@ -34,7 +34,7 @@
* *
* Note the complication that this version may be passed unix format file names * Note the complication that this version may be passed unix format file names
* which might be mistaken for flags. Conveniently the Windows version * which might be mistaken for flags. Conveniently the Windows version
* requires each flag to be separate (e.g. no /su ) and so we will simply * requires each flag to be separate (e.g. no /su ) and so we will simply
* assume that anything longer than /. is a filename. * assume that anything longer than /. is a filename.
*/ */

View File

@ -446,7 +446,7 @@ void output_makefile (void)
if (globals.forward_dll) if (globals.forward_dll)
fprintf (specfile,"#import %s.dll\n", globals.forward_dll); fprintf (specfile,"#import %s.dll\n", globals.forward_dll);
fclose (makefile); fclose (makefile);
} }