がlamehelperライブラリは、このために使用することができます...あなたを助けるために 使用このウェブサイト: https://www.codeproject.com/Articles/656543/The-LAME-wrapper-An-audio-converter
あなたのコードはややthis-
#include "lameHelper.h"
struct settings_t //make a struct to store settings
{
char* title;
char* artist;
char* album;
char* comment;
char* year;
char* track;
char* genre;
char* albumart;
encode_channel_e channels;
bitrate_e abr_bitrate;
bitrate_e cbr_bitrate;
int quality;
encode_mode_e enc_mode;
samplerate_e resample_frequency; // This is what you are going to need
samplerate_e in_samplerate;
//The constructor: used to set default values
settings_t();
};
int main()
{
settings_t settings;
settings.enc_mode = EM_ABR;
settings.abr_bitrate = BR_128kbps;//If you are going to use ABR encode mode @ 128kbps
settings.album = "The Album";//Setting the album (id3 tag)
settings.albumart = "c:/.../art.jpg";//Setting the albumart
settings.track = "01";//Setting the track
//..and various other settings
lameHelper lhHandle;
lhHandle.encode("c:/.../song.mp3", "c:/.../song.wav", settings);
return 0;
}
のようになります。