mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-08 16:11:14 +02:00
fixed types in ExportMP3.cpp to avoid "signed vs. unsigned" warnings
This commit is contained in:
parent
9f8d3a48d4
commit
e8605025b5
@ -810,7 +810,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
MP3Exporter();
|
MP3Exporter();
|
||||||
virtual ~MP3Exporter();
|
~MP3Exporter();
|
||||||
|
|
||||||
#ifndef DISABLE_DYNAMIC_LOADING_LAME
|
#ifndef DISABLE_DYNAMIC_LOADING_LAME
|
||||||
bool FindLibrary(wxWindow *parent);
|
bool FindLibrary(wxWindow *parent);
|
||||||
@ -1625,7 +1625,7 @@ private:
|
|||||||
int FindValue(CHOICES *choices, int cnt, int needle, int def);
|
int FindValue(CHOICES *choices, int cnt, int needle, int def);
|
||||||
wxString FindName(CHOICES *choices, int cnt, int needle);
|
wxString FindName(CHOICES *choices, int cnt, int needle);
|
||||||
int AskResample(int bitrate, int rate, int lowrate, int highrate);
|
int AskResample(int bitrate, int rate, int lowrate, int highrate);
|
||||||
int AddTags(AudacityProject *project, ArrayOf<char> &buffer, bool *endOfFile, const Tags *tags);
|
id3_length_t AddTags(AudacityProject *project, ArrayOf<char> &buffer, bool *endOfFile, const Tags *tags);
|
||||||
#ifdef USE_LIBID3TAG
|
#ifdef USE_LIBID3TAG
|
||||||
void AddFrame(struct id3_tag *tp, const wxString & n, const wxString & v, const char *name);
|
void AddFrame(struct id3_tag *tp, const wxString & n, const wxString & v, const char *name);
|
||||||
#endif
|
#endif
|
||||||
@ -1806,9 +1806,8 @@ ProgressResult ExportMP3::Export(AudacityProject *project,
|
|||||||
}
|
}
|
||||||
|
|
||||||
ArrayOf<char> id3buffer;
|
ArrayOf<char> id3buffer;
|
||||||
int id3len;
|
|
||||||
bool endOfFile;
|
bool endOfFile;
|
||||||
id3len = AddTags(project, id3buffer, &endOfFile, metadata);
|
id3_length_t id3len = AddTags(project, id3buffer, &endOfFile, metadata);
|
||||||
if (id3len && !endOfFile) {
|
if (id3len && !endOfFile) {
|
||||||
if (id3len > (int)outFile.Write(id3buffer.get(), id3len)) {
|
if (id3len > (int)outFile.Write(id3buffer.get(), id3len)) {
|
||||||
// TODO: more precise message
|
// TODO: more precise message
|
||||||
@ -1819,7 +1818,7 @@ ProgressResult ExportMP3::Export(AudacityProject *project,
|
|||||||
|
|
||||||
wxFileOffset pos = outFile.Tell();
|
wxFileOffset pos = outFile.Tell();
|
||||||
auto updateResult = ProgressResult::Success;
|
auto updateResult = ProgressResult::Success;
|
||||||
long bytes;
|
int bytes = 0;
|
||||||
|
|
||||||
size_t bufferSize = std::max(0, exporter.GetOutBufferSize());
|
size_t bufferSize = std::max(0, exporter.GetOutBufferSize());
|
||||||
if (bufferSize <= 0) {
|
if (bufferSize <= 0) {
|
||||||
@ -2058,7 +2057,7 @@ using id3_tag_holder = std::unique_ptr<id3_tag, id3_tag_deleter>;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// returns buffer len; caller frees
|
// returns buffer len; caller frees
|
||||||
int ExportMP3::AddTags(AudacityProject *WXUNUSED(project), ArrayOf<char> &buffer, bool *endOfFile, const Tags *tags)
|
id3_length_t ExportMP3::AddTags(AudacityProject *WXUNUSED(project), ArrayOf<char> &buffer, bool *endOfFile, const Tags *tags)
|
||||||
{
|
{
|
||||||
#ifdef USE_LIBID3TAG
|
#ifdef USE_LIBID3TAG
|
||||||
id3_tag_holder tp { id3_tag_new() };
|
id3_tag_holder tp { id3_tag_new() };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user