|
|
@ -172,11 +172,11 @@ impl Channel<'_> { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// Set the channel's volume mix.
|
|
|
|
/// Set the channel's volume mix.
|
|
|
|
///
|
|
|
|
///
|
|
|
|
/// # Notes
|
|
|
|
/// # Notes
|
|
|
|
///
|
|
|
|
///
|
|
|
|
/// The buffer's format is read as:
|
|
|
|
/// The buffer's format is read as:
|
|
|
|
///
|
|
|
|
///
|
|
|
|
/// Index 0: Front left volume <br>
|
|
|
|
/// Index 0: Front left volume <br>
|
|
|
|
/// Index 1: Front right volume <br>
|
|
|
|
/// Index 1: Front right volume <br>
|
|
|
|
/// Index 2: Back left volume <br>
|
|
|
|
/// Index 2: Back left volume <br>
|
|
|
@ -210,9 +210,7 @@ impl Channel<'_> { |
|
|
|
/// To ensure safety, checks within [WaveInfo] will clear the whole channel queue if any queued [WaveInfo] is dropped prematurely.
|
|
|
|
/// To ensure safety, checks within [WaveInfo] will clear the whole channel queue if any queued [WaveInfo] is dropped prematurely.
|
|
|
|
pub fn queue_wave(&self, wave: &mut WaveInfo) -> std::result::Result<(), NdspError> { |
|
|
|
pub fn queue_wave(&self, wave: &mut WaveInfo) -> std::result::Result<(), NdspError> { |
|
|
|
match wave.get_status() { |
|
|
|
match wave.get_status() { |
|
|
|
WaveStatus::Playing | WaveStatus::Queued => { |
|
|
|
WaveStatus::Playing | WaveStatus::Queued => return Err(NdspError::WaveBusy(self.id)), |
|
|
|
return Err(NdspError::WaveBusy(self.id)) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
_ => (), |
|
|
|
_ => (), |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -234,18 +232,18 @@ impl Channel<'_> { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// Sets the monopole to be a high pass filter.
|
|
|
|
/// Sets the monopole to be a high pass filter.
|
|
|
|
///
|
|
|
|
///
|
|
|
|
/// # Notes
|
|
|
|
/// # Notes
|
|
|
|
///
|
|
|
|
///
|
|
|
|
/// This is a lower quality filter than the Biquad alternative.
|
|
|
|
/// This is a lower quality filter than the Biquad alternative.
|
|
|
|
pub fn iir_mono_set_params_high_pass_filter(&self, cut_off_freq: f32) { |
|
|
|
pub fn iir_mono_set_params_high_pass_filter(&self, cut_off_freq: f32) { |
|
|
|
unsafe { ctru_sys::ndspChnIirMonoSetParamsHighPassFilter(self.id.into(), cut_off_freq) }; |
|
|
|
unsafe { ctru_sys::ndspChnIirMonoSetParamsHighPassFilter(self.id.into(), cut_off_freq) }; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// Sets the monopole to be a low pass filter.
|
|
|
|
/// Sets the monopole to be a low pass filter.
|
|
|
|
///
|
|
|
|
///
|
|
|
|
/// # Notes
|
|
|
|
/// # Notes
|
|
|
|
///
|
|
|
|
///
|
|
|
|
/// This is a lower quality filter than the Biquad alternative.
|
|
|
|
/// This is a lower quality filter than the Biquad alternative.
|
|
|
|
pub fn iir_mono_set_params_low_pass_filter(&self, cut_off_freq: f32) { |
|
|
|
pub fn iir_mono_set_params_low_pass_filter(&self, cut_off_freq: f32) { |
|
|
|
unsafe { ctru_sys::ndspChnIirMonoSetParamsLowPassFilter(self.id.into(), cut_off_freq) }; |
|
|
|
unsafe { ctru_sys::ndspChnIirMonoSetParamsLowPassFilter(self.id.into(), cut_off_freq) }; |
|
|
|