25 auto format = std::max(effectiveFormat, defaultFormat);
51 for(
auto& stream : importedStreams)
60 for(
const auto track : trackList.Any<
WaveTrack>())
63 while (!trackList.empty())
64 outTracks.push_back(trackList.DetachFirst());
70 outTracks.push_back(track.shared_from_this());
77 for(
auto channel : track->Channels())
Toolkit-neutral facade for basic user interface services.
std::vector< std::shared_ptr< Track > > TrackHolders
static void ShowMessageBox(const TranslatableString &message, const TranslatableString &caption=XO("Import Project"))
static std::shared_ptr< WaveTrack > NewWaveTrack(WaveTrackFactory &trackFactory, unsigned nChannels, sampleFormat effectiveFormat, double rate)
static sampleFormat ChooseFormat(sampleFormat effectiveFormat)
Choose appropriate format, which will not be narrower than the specified one.
static void ForEachChannel(TrackList &trackList, const std::function< void(WaveChannel &)> &op)
Iterates over channels in each wave track from the list.
static void FinalizeImport(TrackHolders &outTracks, const std::vector< std::shared_ptr< WaveTrack > > &importedStreams)
Flushes the given channels and moves them to outTracks.
A flat linked list of tracks supporting Add, Remove, Clear, and Contains, serialization of the list o...
auto Any() -> TrackIterRange< TrackType >
Holds a msgid for the translation catalog; may also bind format arguments.
Used to create or clone a WaveTrack, with appropriate context from the project that will own the trac...
std::shared_ptr< WaveTrack > Create()
Creates an unnamed empty WaveTrack with default sample format and default rate.
A Track that contains audio waveform data.
std::shared_ptr< WaveTrack > Holder
MessageBoxResult ShowMessageBox(const TranslatableString &message, MessageBoxOptions options={})
Show a modal message box with either Ok or Yes and No, and optionally Cancel.
PROJECT_RATE_API sampleFormat SampleFormatChoice()