238{
239
240 return GuardedCall< FLAC__StreamDecoderWriteStatus > ( [&] {
242
245 if (frame->header.bits_per_sample <= 16) {
246 if (frame->header.bits_per_sample == 8) {
247 for (unsigned int s = 0; s < frame->header.blocksize; s++) {
248 tmp[s] = buffer[chn][s] << 8;
249 }
250 } else {
251 for (unsigned int s = 0; s < frame->header.blocksize; s++) {
252 tmp[s] = buffer[chn][s];
253 }
254 }
255
258 frame->header.blocksize, 1,
260 }
261 else {
264 frame->header.blocksize, 1,
266 }
267 }
268
270
273 {
274 return FLAC__STREAM_DECODER_WRITE_STATUS_ABORT;
275 }
276
277 return FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE;
279}
SimpleGuard< R > MakeSimpleGuard(R value) noexcept(noexcept(SimpleGuard< R >{ value }))
Convert a value to a handler function returning that value, suitable for GuardedCall<R>
Append([](My &table) -> Registry::BaseItemPtr { if(WaveTrackSubViews::slots() > 1) return std::make_unique< Entry >("MultiView", Entry::CheckItem, OnMultiViewID, XXO("&Multi-view"), POPUP_MENU_FN(OnMultiView), table, [](PopupMenuHandler &handler, wxMenu &menu, int id){ auto &table=static_cast< WaveTrackMenuTable & >(handler);auto &track=table.FindWaveTrack();const auto &view=WaveTrackView::Get(track);menu.Check(id, view.GetMultiView());});else return nullptr;})
This simplifies arrays of arrays, each array separately allocated with NEW[] But it might be better t...
NewChannelGroup mChannels
FLAC__uint64 mSamplesDone
ProgressResult mUpdateResult
std::unique_ptr< ProgressDialog > mProgress