mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-17 00:20:06 +02:00
Hyphenate all 8, 16, 24, 32 and 64 bit strings
This commit is contained in:
parent
848ec5a9b9
commit
f804e5049e
@ -86,7 +86,7 @@ wxString sf_encoding_index_name(int i)
|
|||||||
format_info.format = i;
|
format_info.format = i;
|
||||||
sf_command (NULL, SFC_GET_FORMAT_SUBTYPE,
|
sf_command (NULL, SFC_GET_FORMAT_SUBTYPE,
|
||||||
&format_info, sizeof (format_info));
|
&format_info, sizeof (format_info));
|
||||||
return LAT1CTOWX(format_info.name);
|
return sf_normalize_name(format_info.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int sf_encoding_index_to_subtype(int i)
|
unsigned int sf_encoding_index_to_subtype(int i)
|
||||||
@ -163,7 +163,7 @@ wxString sf_encoding_name(int encoding)
|
|||||||
format_info.format = (encoding & SF_FORMAT_SUBMASK);
|
format_info.format = (encoding & SF_FORMAT_SUBMASK);
|
||||||
sf_command(NULL, SFC_GET_FORMAT_INFO, &format_info, sizeof(format_info));
|
sf_command(NULL, SFC_GET_FORMAT_INFO, &format_info, sizeof(format_info));
|
||||||
|
|
||||||
return LAT1CTOWX(format_info.name);
|
return sf_normalize_name(format_info.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
int sf_num_simple_formats()
|
int sf_num_simple_formats()
|
||||||
@ -237,6 +237,19 @@ wxArrayString sf_get_all_extensions()
|
|||||||
return exts;
|
return exts;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxString sf_normalize_name(const char *name)
|
||||||
|
{
|
||||||
|
wxString n = LAT1CTOWX(name);
|
||||||
|
|
||||||
|
n.Replace(wxT("8 bit"), wxT("8-bit"));
|
||||||
|
n.Replace(wxT("16 bit"), wxT("16-bit"));
|
||||||
|
n.Replace(wxT("24 bit"), wxT("24-bit"));
|
||||||
|
n.Replace(wxT("32 bit"), wxT("32-bit"));
|
||||||
|
n.Replace(wxT("64 bit"), wxT("64-bit"));
|
||||||
|
|
||||||
|
return n;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef __WXMAC__
|
#ifdef __WXMAC__
|
||||||
|
|
||||||
// TODO: find out the appropriate OSType
|
// TODO: find out the appropriate OSType
|
||||||
|
@ -96,6 +96,8 @@ bool sf_subtype_is_integer(unsigned int format);
|
|||||||
|
|
||||||
wxArrayString sf_get_all_extensions();
|
wxArrayString sf_get_all_extensions();
|
||||||
|
|
||||||
|
wxString sf_normalize_name(const char *name);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Mac OS 4-char type
|
// Mac OS 4-char type
|
||||||
//
|
//
|
||||||
|
@ -58,9 +58,9 @@ struct
|
|||||||
}
|
}
|
||||||
static const kFormats[] =
|
static const kFormats[] =
|
||||||
{
|
{
|
||||||
{ SF_FORMAT_AIFF | SF_FORMAT_PCM_16, wxT("AIFF"), XO("AIFF (Apple) signed 16 bit PCM") },
|
{ SF_FORMAT_AIFF | SF_FORMAT_PCM_16, wxT("AIFF"), XO("AIFF (Apple) signed 16-bit PCM") },
|
||||||
{ SF_FORMAT_WAV | SF_FORMAT_PCM_16, wxT("WAV"), XO("WAV (Microsoft) signed 16 bit PCM") },
|
{ SF_FORMAT_WAV | SF_FORMAT_PCM_16, wxT("WAV"), XO("WAV (Microsoft) signed 16-bit PCM") },
|
||||||
{ SF_FORMAT_WAV | SF_FORMAT_FLOAT, wxT("WAVFLT"), XO("WAV (Microsoft) 32 bit float PCM") },
|
{ SF_FORMAT_WAV | SF_FORMAT_FLOAT, wxT("WAVFLT"), XO("WAV (Microsoft) 32-bit float PCM") },
|
||||||
{ SF_FORMAT_WAV | SF_FORMAT_GSM610, wxT("GSM610"), XO("GSM 6.10 WAV (mobile)") },
|
{ SF_FORMAT_WAV | SF_FORMAT_GSM610, wxT("GSM610"), XO("GSM 6.10 WAV (mobile)") },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user