Lame
drasnor
Starship OperatorHawthorne, CA Icrontian
Is there a known problem with the DirectShow filter source and ACM codec source included with the 3.93.1 release of LAME? I can _NOT_ get them to compile. It keeps giving me linker errors, not the usual "can't find this or that".
I got libmp3lame.lib to compile, and mpglib.lib to compile, so at least PART of the release works.
I'm using Microsoft Visual Studio .NET, and I have the latest full Platform SDK installed as well as the DirectX 9 SDK. I'm using nasm 0.98.38 for my assembler, and the default compiler for MSVC.
-drasnor
I got libmp3lame.lib to compile, and mpglib.lib to compile, so at least PART of the release works.
I'm using Microsoft Visual Studio .NET, and I have the latest full Platform SDK installed as well as the DirectX 9 SDK. I'm using nasm 0.98.38 for my assembler, and the default compiler for MSVC.
-drasnor
0
Comments
Care to post the error messages and the code that causes the errors?
------ Build started: Project: libmp3lame, Configuration: Release NASM Win32 ------ libmp3lame - up-to-date. ------ Build started: Project: mpglib, Configuration: Release NASM Win32 ------ mpglib - up-to-date. ------ Build started: Project: lame, Configuration: Release NASM Win32 ------ Linking... libmp3lame.lib(set_get.obj) : error LNK2019: unresolved external symbol _apply_preset referenced in function _lame_set_preset .\Release_NASM/lame.exe : fatal error LNK1120: 1 unresolved externals Build log was saved at "file://d:\drasnor\Desktop\lame-3.93.1\lame-3.93.1\frontend\Release_NASM\BuildLog.htm" lame - 2 error(s), 0 warning(s) ------ Skipped Build: Project: MP3x, Configuration: Release Win32 ------ Project configuration skipped because it is not selected in this solution configuration ------ Build started: Project: MP3EncDll, Configuration: Release NASM Win32 ------ Linking... Creating library .\Release_NASM/lame_enc.lib and object .\Release_NASM/lame_enc.exp set_get.obj : error LNK2019: unresolved external symbol _apply_preset referenced in function _lame_set_preset Release\lame_enc.dll : fatal error LNK1120: 1 unresolved externals Build log was saved at "file://d:\drasnor\Desktop\lame-3.93.1\lame-3.93.1\Dll\Release_NASM\BuildLog.htm" MP3EncDll - 2 error(s), 0 warning(s) ------ Build started: Project: LAME DShow, Configuration: Release Win32 ------ Compiling... Encoder.cpp Encoder.cpp(148) : error C2027: use of undefined type 'lame_global_struct' ../include\lame.h(97) : see declaration of 'lame_global_struct' Encoder.cpp(148) : error C2227: left of '->num_channels' must point to class/struct/union Encoder.cpp(149) : error C2027: use of undefined type 'lame_global_struct' ../include\lame.h(97) : see declaration of 'lame_global_struct' Encoder.cpp(149) : error C2227: left of '->in_samplerate' must point to class/struct/union Encoder.cpp(150) : error C2027: use of undefined type 'lame_global_struct' ../include\lame.h(97) : see declaration of 'lame_global_struct' Encoder.cpp(150) : error C2227: left of '->out_samplerate' must point to class/struct/union Encoder.cpp(151) : error C2027: use of undefined type 'lame_global_struct' ../include\lame.h(97) : see declaration of 'lame_global_struct' Encoder.cpp(151) : error C2227: left of '->brate' must point to class/struct/union Encoder.cpp(153) : error C2027: use of undefined type 'lame_global_struct' ../include\lame.h(97) : see declaration of 'lame_global_struct' Encoder.cpp(153) : error C2227: left of '->VBR' must point to class/struct/union Encoder.cpp(154) : error C2027: use of undefined type 'lame_global_struct' ../include\lame.h(97) : see declaration of 'lame_global_struct' Encoder.cpp(154) : error C2227: left of '->VBR_min_bitrate_kbps' must point to class/struct/union Encoder.cpp(155) : error C2027: use of undefined type 'lame_global_struct' ../include\lame.h(97) : see declaration of 'lame_global_struct' Encoder.cpp(155) : error C2227: left of '->VBR_max_bitrate_kbps' must point to class/struct/union Encoder.cpp(157) : error C2027: use of undefined type 'lame_global_struct' ../include\lame.h(97) : see declaration of 'lame_global_struct' Encoder.cpp(157) : error C2227: left of '->copyright' must point to class/struct/union Encoder.cpp(158) : error C2027: use of undefined type 'lame_global_struct' ../include\lame.h(97) : see declaration of 'lame_global_struct' Encoder.cpp(158) : error C2227: left of '->original' must point to class/struct/union Encoder.cpp(159) : error C2027: use of undefined type 'lame_global_struct' ../include\lame.h(97) : see declaration of 'lame_global_struct' Encoder.cpp(159) : error C2227: left of '->error_protection' must point to class/struct/union Encoder.cpp(161) : error C2027: use of undefined type 'lame_global_struct' ../include\lame.h(97) : see declaration of 'lame_global_struct' Encoder.cpp(161) : error C2227: left of '->no_short_blocks' must point to class/struct/union Encoder.cpp(168) : error C2027: use of undefined type 'lame_global_struct' ../include\lame.h(97) : see declaration of 'lame_global_struct' Encoder.cpp(168) : error C2227: left of '->bWriteVbrTag' must point to class/struct/union Encoder.cpp(170) : error C2027: use of undefined type 'lame_global_struct' ../include\lame.h(97) : see declaration of 'lame_global_struct' Encoder.cpp(170) : error C2227: left of '->strict_ISO' must point to class/struct/union Encoder.cpp(171) : error C2027: use of undefined type 'lame_global_struct' ../include\lame.h(97) : see declaration of 'lame_global_struct' Encoder.cpp(171) : error C2227: left of '->VBR_hard_min' must point to class/struct/union Encoder.cpp(172) : error C2027: use of undefined type 'lame_global_struct' ../include\lame.h(97) : see declaration of 'lame_global_struct' Encoder.cpp(172) : error C2227: left of '->force_ms' must point to class/struct/union Encoder.cpp(173) : error C2027: use of undefined type 'lame_global_struct' ../include\lame.h(97) : see declaration of 'lame_global_struct' Encoder.cpp(173) : error C2227: left of '->mode' must point to class/struct/union Encoder.cpp(174) : error C2027: use of undefined type 'lame_global_struct' ../include\lame.h(97) : see declaration of 'lame_global_struct' Encoder.cpp(174) : error C2227: left of '->mode_fixed' must point to class/struct/union Encoder.cpp(178) : error C2027: use of undefined type 'lame_global_struct' ../include\lame.h(97) : see declaration of 'lame_global_struct' Encoder.cpp(178) : error C2227: left of '->lowpassfreq' must point to class/struct/union Encoder.cpp(179) : error C2027: use of undefined type 'lame_global_struct' ../include\lame.h(97) : see declaration of 'lame_global_struct' Encoder.cpp(179) : error C2227: left of '->VBR_max_bitrate_kbps' must point to class/struct/union Encoder.cpp(180) : error C2027: use of undefined type 'lame_global_struct' ../include\lame.h(97) : see declaration of 'lame_global_struct' Encoder.cpp(180) : error C2227: left of '->no_short_blocks' must point to class/struct/union Encoder.cpp(185) : error C2027: use of undefined type 'lame_global_struct' ../include\lame.h(97) : see declaration of 'lame_global_struct' Encoder.cpp(185) : error C2227: left of '->lowpassfreq' must point to class/struct/union Encoder.cpp(186) : error C2027: use of undefined type 'lame_global_struct' ../include\lame.h(97) : see declaration of 'lame_global_struct' Encoder.cpp(186) : error C2227: left of '->highpassfreq' must point to class/struct/union Encoder.cpp(189) : error C2027: use of undefined type 'lame_global_struct' ../include\lame.h(97) : see declaration of 'lame_global_struct' Encoder.cpp(189) : error C2227: left of '->quality' must point to class/struct/union Encoder.cpp(190) : error C2027: use of undefined type 'lame_global_struct' ../include\lame.h(97) : see declaration of 'lame_global_struct' Encoder.cpp(190) : error C2227: left of '->VBR_q' must point to class/struct/union Encoder.cpp(270) : Finish encoding right! Build log was saved at "file://d:\drasnor\Desktop\lame-3.93.1\lame-3.93.1\dshow\Release\BuildLog.htm" LAME DShow - 48 error(s), 0 warning(s) ------ Build started: Project: lameACM, Configuration: Release NASM Win32 ------ Compiling... main.cpp d:\drasnor\Desktop\lame-3.93.1\lame-3.93.1\ACM\ACM.h(75) : error C2061: syntax error : identifier 'LPACMFORMATDETAILS' d:\drasnor\Desktop\lame-3.93.1\lame-3.93.1\ACM\ACM.h(80) : error C2061: syntax error : identifier 'LPACMSTREAMHEADER' d:\drasnor\Desktop\lame-3.93.1\lame-3.93.1\ACM\ACM.h(81) : error C2061: syntax error : identifier 'LPACMSTREAMHEADER' d:\drasnor\Desktop\lame-3.93.1\lame-3.93.1\ACM\ACM.h(84) : error C2065: 'ACMFORMATDETAILS_FORMAT_CHARS' : undeclared identifier d:\drasnor\Desktop\lame-3.93.1\lame-3.93.1\ACM\ACM.h(84) : error C2057: expected constant expression d:\drasnor\Desktop\lame-3.93.1\lame-3.93.1\ACM\ACM.h(85) : error C2057: expected constant expression main.cpp(103) : error C2065: 'LPACMDRVOPENDESC' : undeclared identifier main.cpp(103) : error C2146: syntax error : missing ';' before identifier 'pDesc' main.cpp(103) : error C2065: 'pDesc' : undeclared identifier main.cpp(103) : error C2440: '=' : cannot convert from ''unknown-type'' to ''unknown-type'' main.cpp(103) : error C2146: syntax error : missing ';' before identifier 'lParam2' main.cpp(105) : error C2227: left of '->fccType' must point to class/struct/union main.cpp(108) : error C2227: left of '->fccType' must point to class/struct/union AEncodeProperties.cpp d:\drasnor\Desktop\lame-3.93.1\lame-3.93.1\ACM\ACM.h(75) : error C2061: syntax error : identifier 'LPACMFORMATDETAILS' d:\drasnor\Desktop\lame-3.93.1\lame-3.93.1\ACM\ACM.h(80) : error C2061: syntax error : identifier 'LPACMSTREAMHEADER' d:\drasnor\Desktop\lame-3.93.1\lame-3.93.1\ACM\ACM.h(81) : error C2061: syntax error : identifier 'LPACMSTREAMHEADER' d:\drasnor\Desktop\lame-3.93.1\lame-3.93.1\ACM\ACM.h(84) : error C2065: 'ACMFORMATDETAILS_FORMAT_CHARS' : undeclared identifier d:\drasnor\Desktop\lame-3.93.1\lame-3.93.1\ACM\ACM.h(84) : error C2057: expected constant expression d:\drasnor\Desktop\lame-3.93.1\lame-3.93.1\ACM\ACM.h(85) : error C2057: expected constant expression ACM.cpp d:\drasnor\Desktop\lame-3.93.1\lame-3.93.1\ACM\ACM.h(75) : error C2061: syntax error : identifier 'LPACMFORMATDETAILS' d:\drasnor\Desktop\lame-3.93.1\lame-3.93.1\ACM\ACM.h(80) : error C2061: syntax error : identifier 'LPACMSTREAMHEADER' d:\drasnor\Desktop\lame-3.93.1\lame-3.93.1\ACM\ACM.h(81) : error C2061: syntax error : identifier 'LPACMSTREAMHEADER' d:\drasnor\Desktop\lame-3.93.1\lame-3.93.1\ACM\ACM.h(84) : error C2065: 'ACMFORMATDETAILS_FORMAT_CHARS' : undeclared identifier d:\drasnor\Desktop\lame-3.93.1\lame-3.93.1\ACM\ACM.h(84) : error C2057: expected constant expression d:\drasnor\Desktop\lame-3.93.1\lame-3.93.1\ACM\ACM.h(85) : error C2057: expected constant expression ACM.cpp(427) : error C2065: 'LPACMFORMATDETAILS' : undeclared identifier ACM.cpp(427) : error C2146: syntax error : missing ')' before identifier 'lParam1' ACM.cpp(427) : error C2059: syntax error : ')' ACM.cpp(460) : error C2065: 'LPACMSTREAMHEADER' : undeclared identifier ACM.cpp(460) : error C2146: syntax error : missing ')' before identifier 'lParam2' ACM.cpp(460) : error C2059: syntax error : ')' ACM.cpp(467) : error C2146: syntax error : missing ')' before identifier 'lParam2' ACM.cpp(467) : error C2059: syntax error : ')' ACM.cpp(505) : error C2146: syntax error : missing ')' before identifier 'a_FormatDetails' ACM.cpp(505) : error C2761: 'DWORD ACM::OnFormatDetails(void)' : member function redeclaration not allowed ACM.cpp(505) : error C2059: syntax error : ')' ACM.cpp(506) : error C2143: syntax error : missing ';' before '{' ACM.cpp(506) : error C2447: '{' : missing function header (old-style formal list?) ACM.cpp(656) : error C2664: 'lstrcpyW' : cannot convert parameter 1 from 'char [48]' to 'LPWSTR' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast ACM.cpp(700) : error C2664: 'lstrcpyW' : cannot convert parameter 1 from 'char [32]' to 'LPWSTR' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast ACM.cpp(703) : error C2664: 'MultiByteToWideChar' : cannot convert parameter 5 from 'char [128]' to 'LPWSTR' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast ACM.cpp(704) : error C2664: 'MultiByteToWideChar' : cannot convert parameter 5 from 'char [128]' to 'LPWSTR' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast ACM.cpp(705) : error C2664: 'lstrcpyW' : cannot convert parameter 1 from 'char [80]' to 'LPWSTR' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast ACM.cpp(706) : error C2664: 'lstrcpyW' : cannot convert parameter 1 from 'char [128]' to 'LPWSTR' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast ACM.cpp(708) : error C2664: 'lstrcpyW' : cannot convert parameter 1 from 'char [512]' to 'LPWSTR' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast ACM.cpp(1108) : error C2061: syntax error : identifier 'LPACMSTREAMHEADER' ACM.cpp(1113) : error C2065: 'a_StreamHeader' : undeclared identifier ACM.cpp(1114) : error C2227: left of '->cbSrcLength' must point to class/struct/union ACM.cpp(1115) : error C2227: left of '->pbSrc' must point to class/struct/union ACM.cpp(1116) : error C2227: left of '->cbSrcLengthUsed' must point to class/struct/union ACM.cpp(1117) : error C2227: left of '->cbDstLength' must point to class/struct/union ACM.cpp(1118) : error C2227: left of '->pbDst' must point to class/struct/union ACM.cpp(1119) : error C2227: left of '->cbDstLengthUsed' must point to class/struct/union ACM.cpp(1143) : error C2061: syntax error : identifier 'LPACMSTREAMHEADER' ACM.cpp(1149) : error C2227: left of '->cbSrcLength' must point to class/struct/union ACM.cpp(1150) : error C2227: left of '->cbSrcLengthUsed' must point to class/struct/union ACM.cpp(1151) : error C2227: left of '->cbDstLength' must point to class/struct/union ACM.cpp(1152) : error C2227: left of '->cbDstLengthUsed' must point to class/struct/union ACM.cpp(1157) : error C2227: left of '->cbDstLength' must point to class/struct/union ACM.cpp(1159) : error C2227: left of '->pbDst' must point to class/struct/union ACM.cpp(1159) : error C2227: left of '->cbDstLength' must point to class/struct/union ACM.cpp(1161) : error C2227: left of '->cbDstLengthUsed' must point to class/struct/union ACM.cpp(1220) : error C2057: expected constant expression ACM.cpp(1220) : error C2466: cannot allocate an array of constant size 0 ACM.cpp(1260) : error C2057: expected constant expression ACM.cpp(1260) : error C2466: cannot allocate an array of constant size 0 Build log was saved at "file://d:\drasnor\Desktop\lame-3.93.1\lame-3.93.1\ACM\Release_NASM\BuildLog.htm" lameACM - 66 error(s), 0 warning(s) ---------------------- Done ---------------------- Build: 2 succeeded, 4 failed, 1 skippedSo yeah, I think the build files for ACM and DShow are screwy, which would make sense since the latest binary build I could find was from LAME 3.88. I don't have any explanation for why the LAME .dll won't compile though.
And will someone disable smilies for everything inside a code block?
-drasnor
apply_preset is implemented in presets.c, which is a member of lameACM.
int apply_preset(lame_global_flags* gfp, int preset) { switch (preset) { case MEDIUM: { lame_set_VBR(gfp, vbr_rh); lame_set_preset_expopts(gfp, 3); lame_set_quality(gfp, 2); lame_set_lowpassfreq(gfp, 18000); lame_set_mode(gfp, JOINT_STEREO); lame_set_VBR_min_bitrate_kbps(gfp, 64); lame_set_athaa_sensitivity(gfp, -11); lame_set_msfix(gfp, 3); lame_set_VBR_q(gfp, 3); lame_set_experimentalY(gfp, 1); return preset; } case MEDIUM_FAST: { lame_set_VBR(gfp, vbr_mtrh); lame_set_preset_expopts(gfp, 3); lame_set_quality(gfp, 2); lame_set_lowpassfreq(gfp, 18000); lame_set_mode(gfp, JOINT_STEREO); lame_set_VBR_min_bitrate_kbps(gfp, 64); lame_set_athaa_sensitivity(gfp, -11); lame_set_msfix(gfp, 3); lame_set_VBR_q(gfp, 3); lame_set_experimentalY(gfp, 1); return preset; } case STANDARD: { lame_set_VBR(gfp, vbr_rh); lame_set_preset_expopts(gfp, 3); lame_set_quality(gfp, 2); lame_set_lowpassfreq(gfp, 19000); lame_set_mode(gfp, JOINT_STEREO); lame_set_VBR_min_bitrate_kbps(gfp, 128); return preset; } case STANDARD_FAST: { lame_set_VBR(gfp, vbr_mtrh); lame_set_preset_expopts(gfp, 3); lame_set_quality(gfp, 2); lame_set_lowpassfreq(gfp, 19000); lame_set_mode(gfp, JOINT_STEREO); lame_set_VBR_min_bitrate_kbps(gfp, 128); return preset; } case EXTREME: { lame_set_VBR(gfp, vbr_rh); lame_set_preset_expopts(gfp, 2); lame_set_quality(gfp, 2); lame_set_lowpassfreq(gfp, 19500); lame_set_mode(gfp, JOINT_STEREO); lame_set_VBR_min_bitrate_kbps(gfp, 128); return preset; } case EXTREME_FAST: { lame_set_VBR(gfp, vbr_mtrh); lame_set_preset_expopts(gfp, 2); lame_set_quality(gfp, 2); lame_set_lowpassfreq(gfp, 19500); lame_set_mode(gfp, JOINT_STEREO); lame_set_VBR_min_bitrate_kbps(gfp, 128); return preset; } case INSANE: { lame_set_preset_expopts(gfp, 1); lame_set_brate(gfp, 320); lame_set_quality(gfp, 2); lame_set_mode(gfp, JOINT_STEREO); lame_set_lowpassfreq(gfp, 20500); return preset; } case R3MIX: { lame_set_exp_nspsytune(gfp, lame_get_exp_nspsytune(gfp) | 1); /*nspsytune*/ /* lame_set_experimentalX(gfp,1); (test CVS) */ (void) lame_set_scale( gfp, 0.98 ); /* --scale 0.98*/ lame_set_exp_nspsytune(gfp, lame_get_exp_nspsytune(gfp) | (8 << 20)); lame_set_VBR(gfp,vbr_mtrh); lame_set_VBR_q(gfp,1); lame_set_quality( gfp, 2 ); lame_set_lowpassfreq(gfp,19500); lame_set_mode( gfp, JOINT_STEREO ); lame_set_ATHtype( gfp, 3 ); lame_set_VBR_min_bitrate_kbps(gfp,96); return preset; } default: break; }; if ((preset >= 8) && (preset <=320)) return apply_abr_preset(gfp, preset); return preset; }Just at a glance, it looks like it handles encoder quality in the ACM configuration panel.
-drasnor
-drasnor
-drasnor
Check that file for "apply_preset" (not "_apply_preset") and paste the times it is referenced. I'm thinking perhaps you might need to EXTERN it.