An ImportPlugin for PCM data.
More...
An ImportPlugin for PCM data.
Definition at line 64 of file ImportPCM.cpp.
◆ PCMImportPlugin()
PCMImportPlugin::PCMImportPlugin |
( |
| ) |
|
|
inline |
Definition at line 67 of file ImportPCM.cpp.
69 {
70 }
ImportPlugin(FileExtensions supportedExtensions)
◆ ~PCMImportPlugin()
PCMImportPlugin::~PCMImportPlugin |
( |
| ) |
|
|
inline |
◆ GetPluginFormatDescription()
◆ GetPluginStringID()
wxString PCMImportPlugin::GetPluginStringID |
( |
| ) |
|
|
inlineoverridevirtual |
◆ Open()
Implements ImportPlugin.
Definition at line 115 of file ImportPCM.cpp.
117{
118 SF_INFO info;
119 wxFile f;
121
122 memset(&info, 0, sizeof(info));
123
124
125#ifdef __WXGTK__
126 if (filename.Lower().EndsWith(
wxT(
"mp3"))) {
127
128
129
130
131
132
133
134
135
136
137 return NULL;
138 }
139#endif
140
141
142 if (f.Open(filename)) {
143
144
145
146 file.reset(SFCall<SNDFILE*>(sf_open_fd, f.fd(), SFM_READ, &info, TRUE));
147 }
148
149
150
151
152 f.Detach();
153
154 if (!file) {
155
156
157
158
159 return nullptr;
160 } else if (file &&
161 (info.format & SF_FORMAT_TYPEMASK) == SF_FORMAT_OGG) {
162
163
164
165
166
167
168
169
170
171
172
173 return nullptr;
174 }
175
176
177 return std::make_unique<PCMImportFileHandle>(filename, std::move(file), info);
178}
References wxT().
The documentation for this class was generated from the following file: