public BassWasapiStreamOutput(BassWasapiStreamOutputBehaviour behaviour, BassOutputStream stream) : this() { this.Behaviour = behaviour; this.Rate = behaviour.Output.Rate; this.Channels = BassWasapiDevice.Info.Outputs; //WASAPI requires BASS_SAMPLE_FLOAT so don't bother respecting the output's Float setting. this.Flags = BassFlags.Decode | BassFlags.Float; }
public BassWasapiStreamOutput(BassWasapiStreamOutputBehaviour behaviour, BassOutputStream stream) : this() { this.Behaviour = behaviour; if (behaviour.Output.Rate == stream.Rate) { this.Rate = stream.Rate; } else if (!behaviour.Output.EnforceRate && BassWasapiDevice.Info.SupportedRates.Contains(stream.Rate)) { this.Rate = stream.Rate; } else { Logger.Write(this, LogLevel.Debug, "The requested output rate is either enforced or the device does not support the stream's rate: {0} => {1}", stream.Rate, behaviour.Output.Rate); this.Rate = behaviour.Output.Rate; } this.Channels = BassWasapiDevice.Info.Outputs; //WASAPI requires BASS_SAMPLE_FLOAT so don't bother respecting the output's Float setting. this.Flags = BassFlags.Decode | BassFlags.Float; }