public static bool ToMelodySpeakerDriveOneTimeSoundParameter(byte[] source, int volume, out DriveOneTimeSoundParameter parameter) { parameter = new DriveOneTimeSoundParameter(source); parameter.SetVolume(volume); return(true); }
public static async Task <DriveOneTimeSoundParameter> ToMelodySpeakerDriveOneTimeSoundParameterAsync(string source, int volume) { byte[] sourceBytes = await SourceToBytesAsync(source); DriveOneTimeSoundParameter parameter = new DriveOneTimeSoundParameter(sourceBytes); parameter.SetVolume(volume); return(parameter); }