|
|
@ -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)) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
_ => (), |
|
|
|
_ => (), |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|