30#error Requires libsndfile 1.0 or higher
41 sf_command(NULL, SFC_GET_FORMAT_MAJOR_COUNT,
42 &count,
sizeof(count));
49 SF_FORMAT_INFO format_info;
51 memset(&format_info, 0,
sizeof(format_info));
52 format_info.format =
format;
53 sf_command(NULL, SFC_GET_FORMAT_MAJOR,
54 &format_info,
sizeof (format_info)) ;
61 SF_FORMAT_INFO format_info ;
63 memset(&format_info, 0,
sizeof(format_info));
64 format_info.format = i;
65 sf_command (NULL, SFC_GET_FORMAT_MAJOR,
66 &format_info,
sizeof (format_info));
68 return format_info.format & SF_FORMAT_TYPEMASK;
79 sf_command (NULL, SFC_GET_FORMAT_SUBTYPE_COUNT, &count,
sizeof (
int)) ;
86 SF_FORMAT_INFO format_info ;
88 memset(&format_info, 0,
sizeof(format_info));
89 format_info.format = i;
90 sf_command (NULL, SFC_GET_FORMAT_SUBTYPE,
91 &format_info,
sizeof (format_info));
97 SF_FORMAT_INFO format_info ;
99 memset(&format_info, 0,
sizeof(format_info));
100 format_info.format = i;
101 sf_command (NULL, SFC_GET_FORMAT_SUBTYPE,
102 &format_info,
sizeof (format_info));
104 return format_info.format & SF_FORMAT_SUBMASK;
113 SF_FORMAT_INFO format_info;
115 memset(&format_info, 0,
sizeof(format_info));
116 format_info.format = (
format & SF_FORMAT_TYPEMASK);
117 sf_command(NULL, SFC_GET_FORMAT_INFO, &format_info,
sizeof(format_info));
124 SF_FORMAT_INFO format_info;
128 memset(&format_info, 0,
sizeof(format_info));
129 format_info.format = (
format & SF_FORMAT_TYPEMASK);
130 sf_command(NULL, SFC_GET_FORMAT_INFO, &format_info,
sizeof(format_info));
148 SF_FORMAT_INFO format_info;
150 memset(&format_info, 0,
sizeof(format_info));
151 format_info.format = (
format & SF_FORMAT_TYPEMASK);
152 sf_command(NULL, SFC_GET_FORMAT_INFO, &format_info,
sizeof(format_info));
159 SF_FORMAT_INFO format_info;
161 memset(&format_info, 0,
sizeof(format_info));
162 format_info.format = (encoding & SF_FORMAT_SUBMASK);
163 sf_command(NULL, SFC_GET_FORMAT_INFO, &format_info,
sizeof(format_info));
172 sf_command (NULL, SFC_GET_SIMPLE_FORMAT_COUNT, &count,
sizeof (
int)) ;
184 sf_command (NULL, SFC_GET_SIMPLE_FORMAT,
192 unsigned int subtype =
format & SF_FORMAT_SUBMASK;
193 return (subtype == SF_FORMAT_FLOAT ||
194 subtype == SF_FORMAT_DOUBLE ||
195 subtype == SF_FORMAT_PCM_24 ||
196 subtype == SF_FORMAT_PCM_32);
201 unsigned int subtype =
format & SF_FORMAT_SUBMASK;
202 return (subtype == SF_FORMAT_PCM_16 ||
203 subtype == SF_FORMAT_PCM_24 ||
204 subtype == SF_FORMAT_PCM_32);
208 unsigned int subtype =
format & SF_FORMAT_SUBMASK;
209 if( subtype == SF_FORMAT_PCM_S8 )
211 if( subtype == SF_FORMAT_PCM_U8 )
213 if( subtype == SF_FORMAT_PCM_16 )
215 if( subtype == SF_FORMAT_PCM_24 )
217 if( subtype == SF_FORMAT_PCM_32 )
219 if( subtype == SF_FORMAT_FLOAT )
221 if( subtype == SF_FORMAT_DOUBLE )
231 unsigned int subtype =
format & SF_FORMAT_SUBMASK;
232 if (subtype == SF_FORMAT_PCM_24)
244 SF_FORMAT_INFO format_info;
247 memset(&format_info, 0,
sizeof(format_info));
249 sf_command(NULL, SFC_GET_FORMAT_MAJOR_COUNT,
250 &count,
sizeof(count));
252 for(k=0; k<count; k++) {
253 format_info.format = k;
254 sf_command(NULL, SFC_GET_FORMAT_MAJOR,
255 &format_info,
sizeof (format_info)) ;
279 n.Replace(wxT(
"8 bit"), wxT(
"8-bit"));
280 n.Replace(wxT(
"16 bit"), wxT(
"16-bit"));
281 n.Replace(wxT(
"24 bit"), wxT(
"24-bit"));
282 n.Replace(wxT(
"32 bit"), wxT(
"32-bit"));
283 n.Replace(wxT(
"64 bit"), wxT(
"64-bit"));
295#define NUM_HEADERS 13
302# include <CoreServices/CoreServices.h>
339 auto err = SFCall<int>(sf_close, sf);
342 sf_error_str(sf, buffer, 1000);
345 XO(
"Error (file may not have been written): %s" )
354 wxT(
"/FileFormats/CopyOrEditUncompressedData"),
358 XXO(
"&Copy uncompressed files into the project (safer)")
362 XXO(
"&Read uncompressed files from original location (faster)")
369 wxT(
"/FileFormats/SaveProjectWithDependencies"),
371 { wxT(
"copy"),
XXO(
"&Copy all audio into project (safest)") },
372 { wxT(
"never"),
XXO(
"Do ¬ copy any audio") },
373 { wxT(
"ask"),
XXO(
"As&k") },
int AudacityMessageBox(const TranslatableString &message, const TranslatableString &caption, long style, wxWindow *parent, int x, int y)
const TranslatableString name
std::unique_ptr< Character[], freer > MallocString
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
Extend wxArrayString with move operations and construction and insertion fromstd::initializer_list.
int operator()(SNDFILE *) const