1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-29 22:58:39 +02:00

Fix building without libid3tag (#230)

* Fix building without libid3tag

* Fix building without libid3tag

Extend the pull Audacity#214 from torto9 to fix building
with twolame but without libid3tag
This commit is contained in:
Richard Ash 2018-01-07 17:06:33 +00:00 committed by Paul Licameli
parent 8724a5a283
commit 499c6b4f36
4 changed files with 9 additions and 0 deletions

View File

@ -322,10 +322,13 @@ wxWindow *ExportMP2::OptionsCreate(wxWindow *parent, int format)
return safenew ExportMP2Options(parent, format);
}
#ifdef USE_LIBID3TAG
struct id3_tag_deleter {
void operator () (id3_tag *p) const { if (p) id3_tag_delete(p); }
};
using id3_tag_holder = std::unique_ptr<id3_tag, id3_tag_deleter>;
#endif
// returns buffer len; caller frees
int ExportMP2::AddTags(

View File

@ -2009,10 +2009,12 @@ int ExportMP3::AskResample(int bitrate, int rate, int lowrate, int highrate)
return wxAtoi(choice->GetStringSelection());
}
#ifdef USE_LIBID3TAG
struct id3_tag_deleter {
void operator () (id3_tag *p) const { if (p) id3_tag_delete(p); }
};
using id3_tag_holder = std::unique_ptr<id3_tag, id3_tag_deleter>;
#endif
// returns buffer len; caller frees
int ExportMP3::AddTags(AudacityProject *WXUNUSED(project), ArrayOf<char> &buffer, bool *endOfFile, const Tags *tags)

View File

@ -700,10 +700,12 @@ bool ExportPCM::AddStrings(AudacityProject * WXUNUSED(project), SNDFILE *sf, con
return true;
}
#ifdef USE_LIBID3TAG
struct id3_tag_deleter {
void operator () (id3_tag *p) const { if (p) id3_tag_delete(p); }
};
using id3_tag_holder = std::unique_ptr<id3_tag, id3_tag_deleter>;
#endif
bool ExportPCM::AddID3Chunk(wxString fName, const Tags *tags, int sf_format)
{

View File

@ -335,10 +335,12 @@ static wxString AskCopyOrEdit()
return oldCopyPref;
}
#ifdef USE_LIBID3TAG
struct id3_tag_deleter {
void operator () (id3_tag *p) const { if (p) id3_tag_delete(p); }
};
using id3_tag_holder = std::unique_ptr<id3_tag, id3_tag_deleter>;
#endif
ProgressResult PCMImportFileHandle::Import(TrackFactory *trackFactory,
TrackHolders &outTracks,