25#error Requires libsndfile 1.0 or higher
36 sf_command(NULL, SFC_GET_FORMAT_MAJOR_COUNT,
37 &count,
sizeof(count));
44 SF_FORMAT_INFO format_info;
46 memset(&format_info, 0,
sizeof(format_info));
47 format_info.format =
format;
48 sf_command(NULL, SFC_GET_FORMAT_MAJOR,
49 &format_info,
sizeof (format_info)) ;
56 SF_FORMAT_INFO format_info ;
58 memset(&format_info, 0,
sizeof(format_info));
59 format_info.format = i;
60 sf_command (NULL, SFC_GET_FORMAT_MAJOR,
61 &format_info,
sizeof (format_info));
63 return format_info.format & SF_FORMAT_TYPEMASK;
74 sf_command (NULL, SFC_GET_FORMAT_SUBTYPE_COUNT, &count,
sizeof (
int)) ;
81 SF_FORMAT_INFO format_info ;
83 memset(&format_info, 0,
sizeof(format_info));
84 format_info.format = i;
85 sf_command (NULL, SFC_GET_FORMAT_SUBTYPE,
86 &format_info,
sizeof (format_info));
92 SF_FORMAT_INFO format_info ;
94 memset(&format_info, 0,
sizeof(format_info));
95 format_info.format = i;
96 sf_command (NULL, SFC_GET_FORMAT_SUBTYPE,
97 &format_info,
sizeof (format_info));
99 return format_info.format & SF_FORMAT_SUBMASK;
108 SF_FORMAT_INFO format_info;
110 memset(&format_info, 0,
sizeof(format_info));
111 format_info.format = (
format & SF_FORMAT_TYPEMASK);
112 sf_command(NULL, SFC_GET_FORMAT_INFO, &format_info,
sizeof(format_info));
119 SF_FORMAT_INFO format_info;
123 memset(&format_info, 0,
sizeof(format_info));
124 format_info.format = (
format & SF_FORMAT_TYPEMASK);
125 sf_command(NULL, SFC_GET_FORMAT_INFO, &format_info,
sizeof(format_info));
143 SF_FORMAT_INFO format_info;
145 memset(&format_info, 0,
sizeof(format_info));
146 format_info.format = (
format & SF_FORMAT_TYPEMASK);
147 sf_command(NULL, SFC_GET_FORMAT_INFO, &format_info,
sizeof(format_info));
154 SF_FORMAT_INFO format_info;
156 memset(&format_info, 0,
sizeof(format_info));
157 format_info.format = (encoding & SF_FORMAT_SUBMASK);
158 sf_command(NULL, SFC_GET_FORMAT_INFO, &format_info,
sizeof(format_info));
167 sf_command (NULL, SFC_GET_SIMPLE_FORMAT_COUNT, &count,
sizeof (
int)) ;
179 sf_command (NULL, SFC_GET_SIMPLE_FORMAT,
187 unsigned int subtype =
format & SF_FORMAT_SUBMASK;
188 return (subtype == SF_FORMAT_FLOAT ||
189 subtype == SF_FORMAT_DOUBLE ||
190 subtype == SF_FORMAT_PCM_24 ||
191 subtype == SF_FORMAT_PCM_32);
196 unsigned int subtype =
format & SF_FORMAT_SUBMASK;
197 return (subtype == SF_FORMAT_PCM_16 ||
198 subtype == SF_FORMAT_PCM_24 ||
199 subtype == SF_FORMAT_PCM_32);
203 unsigned int subtype =
format & SF_FORMAT_SUBMASK;
204 if( subtype == SF_FORMAT_PCM_S8 )
206 if( subtype == SF_FORMAT_PCM_U8 )
208 if( subtype == SF_FORMAT_PCM_16 )
210 if( subtype == SF_FORMAT_PCM_24 )
212 if( subtype == SF_FORMAT_PCM_32 )
214 if( subtype == SF_FORMAT_FLOAT )
216 if( subtype == SF_FORMAT_DOUBLE )
226 unsigned int subtype =
format & SF_FORMAT_SUBMASK;
227 if (subtype == SF_FORMAT_PCM_24)
239 SF_FORMAT_INFO format_info;
242 memset(&format_info, 0,
sizeof(format_info));
244 sf_command(NULL, SFC_GET_FORMAT_MAJOR_COUNT,
245 &count,
sizeof(count));
247 for(k=0; k<count; k++) {
248 format_info.format = k;
249 sf_command(NULL, SFC_GET_FORMAT_MAJOR,
250 &format_info,
sizeof (format_info)) ;
274 n.Replace(
wxT(
"8 bit"),
wxT(
"8-bit"));
275 n.Replace(
wxT(
"16 bit"),
wxT(
"16-bit"));
276 n.Replace(
wxT(
"24 bit"),
wxT(
"24-bit"));
277 n.Replace(
wxT(
"32 bit"),
wxT(
"32-bit"));
278 n.Replace(
wxT(
"64 bit"),
wxT(
"64-bit"));
290#define NUM_HEADERS 13
297# include <CoreServices/CoreServices.h>
334 auto err = SFCall<int>(sf_close, sf);
337 sf_error_str(sf, buffer, 1000);
340 XO(
"Error (file may not have been written): %s" )
Toolkit-neutral facade for basic user interface services.
std::unique_ptr< Character[], freer > MallocString
Extend wxArrayString with move operations and construction and insertion fromstd::initializer_list.
MessageBoxResult ShowMessageBox(const TranslatableString &message, MessageBoxOptions options={})
Show a modal message box with either Ok or Yes and No, and optionally Cancel.
int operator()(SNDFILE *) const