29#error Requires libsndfile 1.0 or higher
40 sf_command(NULL, SFC_GET_FORMAT_MAJOR_COUNT,
41 &count,
sizeof(count));
48 SF_FORMAT_INFO format_info;
50 memset(&format_info, 0,
sizeof(format_info));
51 format_info.format =
format;
52 sf_command(NULL, SFC_GET_FORMAT_MAJOR,
53 &format_info,
sizeof (format_info)) ;
60 SF_FORMAT_INFO format_info ;
62 memset(&format_info, 0,
sizeof(format_info));
63 format_info.format = i;
64 sf_command (NULL, SFC_GET_FORMAT_MAJOR,
65 &format_info,
sizeof (format_info));
67 return format_info.format & SF_FORMAT_TYPEMASK;
78 sf_command (NULL, SFC_GET_FORMAT_SUBTYPE_COUNT, &count,
sizeof (
int)) ;
85 SF_FORMAT_INFO format_info ;
87 memset(&format_info, 0,
sizeof(format_info));
88 format_info.format = i;
89 sf_command (NULL, SFC_GET_FORMAT_SUBTYPE,
90 &format_info,
sizeof (format_info));
96 SF_FORMAT_INFO format_info ;
98 memset(&format_info, 0,
sizeof(format_info));
99 format_info.format = i;
100 sf_command (NULL, SFC_GET_FORMAT_SUBTYPE,
101 &format_info,
sizeof (format_info));
103 return format_info.format & SF_FORMAT_SUBMASK;
112 SF_FORMAT_INFO format_info;
114 memset(&format_info, 0,
sizeof(format_info));
115 format_info.format = (
format & SF_FORMAT_TYPEMASK);
116 sf_command(NULL, SFC_GET_FORMAT_INFO, &format_info,
sizeof(format_info));
123 SF_FORMAT_INFO format_info;
127 memset(&format_info, 0,
sizeof(format_info));
128 format_info.format = (
format & SF_FORMAT_TYPEMASK);
129 sf_command(NULL, SFC_GET_FORMAT_INFO, &format_info,
sizeof(format_info));
147 SF_FORMAT_INFO format_info;
149 memset(&format_info, 0,
sizeof(format_info));
150 format_info.format = (
format & SF_FORMAT_TYPEMASK);
151 sf_command(NULL, SFC_GET_FORMAT_INFO, &format_info,
sizeof(format_info));
158 SF_FORMAT_INFO format_info;
160 memset(&format_info, 0,
sizeof(format_info));
161 format_info.format = (encoding & SF_FORMAT_SUBMASK);
162 sf_command(NULL, SFC_GET_FORMAT_INFO, &format_info,
sizeof(format_info));
171 sf_command (NULL, SFC_GET_SIMPLE_FORMAT_COUNT, &count,
sizeof (
int)) ;
183 sf_command (NULL, SFC_GET_SIMPLE_FORMAT,
191 unsigned int subtype =
format & SF_FORMAT_SUBMASK;
192 return (subtype == SF_FORMAT_FLOAT ||
193 subtype == SF_FORMAT_DOUBLE ||
194 subtype == SF_FORMAT_PCM_24 ||
195 subtype == SF_FORMAT_PCM_32);
200 unsigned int subtype =
format & SF_FORMAT_SUBMASK;
201 return (subtype == SF_FORMAT_PCM_16 ||
202 subtype == SF_FORMAT_PCM_24 ||
203 subtype == SF_FORMAT_PCM_32);
207 unsigned int subtype =
format & SF_FORMAT_SUBMASK;
208 if( subtype == SF_FORMAT_PCM_S8 )
210 if( subtype == SF_FORMAT_PCM_U8 )
212 if( subtype == SF_FORMAT_PCM_16 )
214 if( subtype == SF_FORMAT_PCM_24 )
216 if( subtype == SF_FORMAT_PCM_32 )
218 if( subtype == SF_FORMAT_FLOAT )
220 if( subtype == SF_FORMAT_DOUBLE )
230 unsigned int subtype =
format & SF_FORMAT_SUBMASK;
231 if (subtype == SF_FORMAT_PCM_24)
243 SF_FORMAT_INFO format_info;
246 memset(&format_info, 0,
sizeof(format_info));
248 sf_command(NULL, SFC_GET_FORMAT_MAJOR_COUNT,
249 &count,
sizeof(count));
251 for(k=0; k<count; k++) {
252 format_info.format = k;
253 sf_command(NULL, SFC_GET_FORMAT_MAJOR,
254 &format_info,
sizeof (format_info)) ;
278 n.Replace(
wxT(
"8 bit"),
wxT(
"8-bit"));
279 n.Replace(
wxT(
"16 bit"),
wxT(
"16-bit"));
280 n.Replace(
wxT(
"24 bit"),
wxT(
"24-bit"));
281 n.Replace(
wxT(
"32 bit"),
wxT(
"32-bit"));
282 n.Replace(
wxT(
"64 bit"),
wxT(
"64-bit"));
294#define NUM_HEADERS 13
301# include <CoreServices/CoreServices.h>
338 auto err = SFCall<int>(sf_close, sf);
341 sf_error_str(sf, buffer, 1000);
344 XO(
"Error (file may not have been written): %s" )
353 wxT(
"/FileFormats/CopyOrEditUncompressedData"),
357 XXO(
"&Copy uncompressed files into the project (safer)")
361 XXO(
"&Read uncompressed files from original location (faster)")
368 wxT(
"/FileFormats/SaveProjectWithDependencies"),
370 {
wxT(
"copy"),
XXO(
"&Copy all audio into project (safest)") },
371 {
wxT(
"never"),
XXO(
"Do ¬ copy any audio") },
372 {
wxT(
"ask"),
XXO(
"As&k") },
int AudacityMessageBox(const TranslatableString &message, const TranslatableString &caption, long style, wxWindow *parent, int x, int y)
const TranslatableString name
XXO("&Cut/Copy/Paste Toolbar")
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