12 : audioInputFilenameSetting(
13 commandController,
"audio-inputfilename",
14 "filename of the file where the sampler reads data from",
17 audioInputFilenameSetting.
attach(*
this);
22 audioInputFilenameSetting.
detach(*
this);
25void WavAudioInput::loadWave()
38 return "Read .wav files. Can for example be used as input for "
49 throw PlugException(
"Load of wave file failed: ", e.getMessage());
61 assert(&
setting == &audioInputFilenameSetting);
66 }
catch (MSXException& e) {
68 setting.getCommandController().getCliComm().printWarning(
69 "Load of wave file failed: ",
e.getMessage());
76 unsigned pos = (time - reference).getTicksAt(wav.
getFreq());
82template<
typename Archive>
85 ar.serialize(
"reference", reference);
86 if constexpr (Archive::IS_LOADER) {
87 update(audioInputFilenameSetting);
Represents something you can plug devices into.
zstring_view getString() const noexcept
Thrown when a plug action fails.
void detach(Observer< T > &observer)
void attach(Observer< T > &observer)
int16_t getSample(size_t pos) const
string expandTilde(string path)
Expand the '~' character to the users home directory.
This file implemented 3 utility functions:
#define INSTANTIATE_SERIALIZE_METHODS(CLASS)