一:MP3转换为WAV
function acmDriverEnumCallback(hadid: HACMDRIVERID; dwInstance: DWORD; fdwSupport: DWORD): BOOL; stdcall;
var
driver : HACMDRIVER;
details : TACMDRIVERDETAILS;
i : integer;
fmtDetails : TACMFORMATTAGDETAILS;
begin
if (fdwSupport and ACMDRIVERDETAILS_SUPPORTF_CODEC) <> 0 then
begin
details.cbStruct := sizeof(TACMDRIVERDETAILS);
acmDriverDetails(hadid, details, 0);
acmDriverOpen(driver, hadid, 0);
for i := 0 to details.cFormatTags - 1 do
begin
ZeroMemory(@fmtDetails, sizeof(fmtDetails));
fmtDetails.cbStruct := sizeof(TACMFORMATTAGDETAILS);
fmtDetails.dwFormatTagIndex := i;
acmFormatTagDetails(driver, fmtDetails, ACM_FORMATTAGDETAILSF_INDEX);
if (fmtDetails.dwFormatTag = WAVE_FORMAT_MPEGLAYER3) then inc(g_mp3Drivers);
end;
acmDriverClose(driver, 0);
end;
Result := true;
end;
function ConverMP3ToRaw(Mp3FileName: pChar; const Channels, SamplesPerSec, BitsPerSample: Integer): Boolean; stdcall;
var
mmr : MMRESULT;
maxFormatSize &nb