fmod/core/dsp/
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 channel_format;
10mod connections;
11mod general;
12mod metering;
13mod parameters;
14mod processing;
15
16#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
17#[repr(transparent)] // so we can transmute between types
18pub struct Dsp {
19    pub(crate) inner: *mut FMOD_DSP,
20}
21
22unsafe impl Send for Dsp {}
23unsafe impl Sync for Dsp {}
24
25impl From<*mut FMOD_DSP> for Dsp {
26    fn from(value: *mut FMOD_DSP) -> Self {
27        Dsp { inner: value }
28    }
29}
30
31impl From<Dsp> for *mut FMOD_DSP {
32    fn from(value: Dsp) -> Self {
33        value.inner
34    }
35}