fmod/core/sound_group/
mod.rs

1// Copyright (c) 2024 Lily Lyons
2//
3// This Source Code Form is subject to the terms of the Mozilla Public
4// License, v. 2.0. If a copy of the MPL was not distributed with this
5// file, You can obtain one at https://mozilla.org/MPL/2.0/.
6
7use fmod_sys::*;
8
9mod general;
10mod group;
11mod sound;
12
13#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
14#[repr(transparent)] // so we can transmute between types
15pub struct SoundGroup {
16    pub(crate) inner: *mut FMOD_SOUNDGROUP,
17}
18
19unsafe impl Send for SoundGroup {}
20unsafe impl Sync for SoundGroup {}
21
22impl From<*mut FMOD_SOUNDGROUP> for SoundGroup {
23    fn from(value: *mut FMOD_SOUNDGROUP) -> Self {
24        SoundGroup { inner: value }
25    }
26}
27
28impl From<SoundGroup> for *mut FMOD_SOUNDGROUP {
29    fn from(value: SoundGroup) -> Self {
30        value.inner
31    }
32}