Skip to content

Commit

Permalink
Retain original copyright/license headers (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
GitGhillie authored Apr 4, 2024
1 parent 519d52a commit fcef25d
Show file tree
Hide file tree
Showing 13 changed files with 221 additions and 0 deletions.
17 changes: 17 additions & 0 deletions crates/phonon/benches/reverb_bench.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
//
// Copyright 2017-2023 Valve Corporation.
// Copyright 2024 phonon_rs contributors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

use criterion::{black_box, criterion_group, criterion_main, Criterion};
use phonon::audio_buffer::{AudioBuffer, AudioSettings};
use phonon::reverb_effect::{ReverbEffect, ReverbEffectParams};
Expand Down
17 changes: 17 additions & 0 deletions crates/phonon/src/audio_buffer.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
//
// Copyright 2017-2023 Valve Corporation.
// Copyright 2024 phonon_rs contributors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

use derive_deref::{Deref, DerefMut};

pub enum AudioEffectState {
Expand Down
17 changes: 17 additions & 0 deletions crates/phonon/src/bands.rs
Original file line number Diff line number Diff line change
@@ -1 +1,18 @@
//
// Copyright 2017-2023 Valve Corporation.
// Copyright 2024 phonon_rs contributors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

pub(crate) const NUM_BANDS: usize = 3;
17 changes: 17 additions & 0 deletions crates/phonon/src/coordinate_space.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
//
// Copyright 2017-2023 Valve Corporation.
// Copyright 2024 phonon_rs contributors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

use glam::Vec3;

/// Template class that represents a Cartesian coordinate system in 3D, with coordinate axes and origin. The
Expand Down
17 changes: 17 additions & 0 deletions crates/phonon/src/delay.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
//
// Copyright 2017-2023 Valve Corporation.
// Copyright 2024 phonon_rs contributors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

// Port notes:
// - `Delay` is just a ring buffer implementation
// - Skipped implementing `resize()` as it does not seem to be used in Steam Audio
Expand Down
17 changes: 17 additions & 0 deletions crates/phonon/src/iir.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
//
// Copyright 2017-2023 Valve Corporation.
// Copyright 2024 phonon_rs contributors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

use crate::delay::Delay;
use biquad::*;

Expand Down
17 changes: 17 additions & 0 deletions crates/phonon/src/reverb_effect.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
//
// Copyright 2017-2023 Valve Corporation.
// Copyright 2024 phonon_rs contributors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

use crate::audio_buffer::{AudioBuffer, AudioEffectState, AudioSettings};
use crate::bands::NUM_BANDS;
use crate::delay::Delay;
Expand Down
17 changes: 17 additions & 0 deletions crates/phonon/src/reverb_estimator.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
//
// Copyright 2017-2023 Valve Corporation.
// Copyright 2024 phonon_rs contributors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

use crate::bands::NUM_BANDS;

pub struct Reverb {
Expand Down
17 changes: 17 additions & 0 deletions crates/phonon/tests/array_test.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
//
// Copyright 2017-2023 Valve Corporation.
// Copyright 2024 phonon_rs contributors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

// I kinda doubt we need these tests...
// But I haven't had to implement special array types yet...

Expand Down
17 changes: 17 additions & 0 deletions crates/phonon/tests/audio_buffer_test.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
//
// Copyright 2017-2023 Valve Corporation.
// Copyright 2024 phonon_rs contributors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

use phonon::audio_buffer::AudioBuffer;

#[test]
Expand Down
17 changes: 17 additions & 0 deletions crates/phonon/tests/coordinate_space_test.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
//
// Copyright 2017-2023 Valve Corporation.
// Copyright 2024 phonon_rs contributors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

use glam::Vec3;
use phonon::coordinate_space::CoordinateSpace3f;

Expand Down
17 changes: 17 additions & 0 deletions crates/phonon/tests/iir_filter_test.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
//
// Copyright 2017-2023 Valve Corporation.
// Copyright 2024 phonon_rs contributors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

use biquad::*;

#[test]
Expand Down
17 changes: 17 additions & 0 deletions crates/phonon/tests/vector_test.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
//
// Copyright 2017-2023 Valve Corporation.
// Copyright 2024 phonon_rs contributors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

use glam::{Vec2, Vec3, Vec4};
use std::mem::size_of;

Expand Down

0 comments on commit fcef25d

Please sign in to comment.