Ejemplo n.º 1
0
 internal static ModuleAudio FromModel(Model.Audio.ModuleAudio audio) =>
 new ModuleAudio
 {
     Identifier            = ModuleIdentifier.FromModel(audio.Schema.Identifier),
     Format                = AudioFormat.FromModel(audio.Format),
     DurationPerInstrument = Duration.FromTimeSpan(audio.DurationPerInstrument),
     InstrumentCaptures    = { audio.Captures.Select(InstrumentAudio.FromModel) }
 };
Ejemplo n.º 2
0
 /// <summary>
 /// Saves module audio data to the specified stream.
 /// </summary>
 /// <param name="audio">The audio data to save. Must not be null.</param>
 /// <param name="stream">The stream to save the data to. Must not be null.</param>
 public static void Save(this Model.Audio.ModuleAudio audio, Stream stream) => ProtoIo.Write(stream, audio);