3wz / Lame-For-Unity

适用于Unity3D 把声音Wav转换为MP3, 用于录音时压缩语音上传等功能
MIT License
52 stars 25 forks source link

2019.3 Standalone build error #8

Open HaruHappy opened 4 years ago

HaruHappy commented 4 years ago

Assets\Lame\LibMp3Lame.cs(730,24): error CS0103: The name 'libname' does not exist in the current context

image

AxcellHunt-RMS commented 3 years ago

I've encountered this issue as well. Did you ever manage to fix it @HaruHappy ?

devkon-at commented 3 years ago

I know this is an old issue, but i had the same problem in Unity 2020.3 while using this Asset as part of Save AudioClip to MP3 (https://github.com/Team-on/Unity3D-save-audioClip-to-MP3)

The Platform dependent definition of the libname is missing my Build target (Standalone Windows) https://github.com/3wz/Lame-For-Unity/blob/0e3188496b838cd35c1906caf117bc384e3666e5/Assets/Lame/LibMp3Lame.cs#L680. Fixed by adding `

elif UNITY_STANDALONE_WIN

    const string libname = @"libmp3lame.dll";

` to the linked blocked.