pub fn add_arrangement(
		&mut self,
		arrangement: Arrangement,
	) -> Result<ArrangementHandle, AddArrangementError> {
		if !self.does_track_exist(arrangement.default_track()) {
			return Err(AddArrangementError::NoTrackWithIndex(
				arrangement.default_track(),
			));
		}
		if let Some(group) = self.first_missing_group_in_set(arrangement.groups()) {
			return Err(AddArrangementError::NoGroupWithId(group));
		}
		self.active_ids.add_arrangement_id(arrangement.id())?;
		let handle = ArrangementHandle::new(&arrangement, self.command_producer.clone());
		let arrangement = Owned::new(&self.resource_collector().handle(), arrangement);
		self.command_producer
			.push(ResourceCommand::AddArrangement(arrangement).into())?;
		Ok(handle)
	}
/// Sends a arrangement to the audio thread and returns a handle to the arrangement.
Sends a arrangement to the audio thread and returns a handle to the arrangement.
Sends a arrangement to the audio thread and returns a handle to the arrangement .
pub fn add_arrangement(
		&mut self,
		arrangement: Arrangement,
	) -> Result<ArrangementHandle, AddArrangementError> {
		if !self.does_track_exist(arrangement.default_track()) {
			return Err(AddArrangementError::NoTrackWithIndex(
				arrangement.default_track(),
			));
		}
		if let Some(group) = self.first_missing_group_in_set(arrangement.groups()) {
			return Err(AddArrangementError::NoGroupWithId(group));
		}
		self.active_ids.add_arrangement_id(arrangement.id())?;
		let handle = ArrangementHandle::new(&arrangement, self.command_producer.clone());
		let arrangement = Owned::new(&self.resource_collector().handle(), arrangement);
		self.command_producer
			.push(ResourceCommand::AddArrangement(arrangement).into())?;
		Ok(handle)
	}
pub fn add_arrangement ( & mut self , arrangement : Arrangement , ) -> Result < ArrangementHandle , AddArrangementError > { if ! self . does_track_exist ( arrangement . default_track ( ) ) { return Err ( AddArrangementError :: NoTrackWithIndex ( arrangement . default_track ( ) , ) ) ; } if let Some ( group ) = self . first_missing_group_in_set ( arrangement . groups ( ) ) { return Err ( AddArrangementError :: NoGroupWithId ( group ) ) ; } self . active_ids . add_arrangement_id ( arrangement . id ( ) ) ? ; let handle = ArrangementHandle :: new ( & arrangement , self . command_producer . clone ( ) ) ; let arrangement = Owned :: new ( & self . resource_collector ( ) . handle ( ) , arrangement ) ; self . command_producer . push ( ResourceCommand :: AddArrangement ( arrangement ) . into ( ) ) ? ; Ok ( handle ) }
Sends a arrangement to the audio thread and returns a handle to the arrangement.
Sends a arrangement to the audio thread and returns a handle to the arrangement .
&mut self
arrangement
Arrangement
&mut self
arrangement
Arrangement