Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: JamesHallowell/cxx-juce
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: neodsp/cxx-juce
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.
  • 2 commits
  • 7 files changed
  • 1 contributor

Commits on Dec 17, 2024

  1. Copy the full SHA
    5247a47 View commit details
  2. Copy the full SHA
    c808703 View commit details
Showing with 347 additions and 53 deletions.
  1. +318 −0 Cargo.lock
  2. +2 −3 examples/audio_callback.rs
  3. +2 −3 examples/devices.rs
  4. +2 −3 examples/test_tone.rs
  5. +17 −2 src/juce_audio_devices.rs
  6. +2 −35 src/lib.rs
  7. +4 −7 tests/juce_audio_devices.rs
318 changes: 318 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions examples/audio_callback.rs
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ use {
AudioDeviceManager, AudioIODevice, AudioIODeviceCallback, InputAudioSampleBuffer,
OutputAudioSampleBuffer,
},
Result, JUCE,
Result,
},
std::{iter::successors, thread::sleep, time::Duration},
};
@@ -77,8 +77,7 @@ impl AudioIODeviceCallback for AudioCallback {
}

fn main() -> Result<()> {
let juce = JUCE::initialise();
let mut device_manager = AudioDeviceManager::new(&juce);
let mut device_manager = AudioDeviceManager::new();
device_manager.initialise(0, 2)?;

let handle = device_manager.add_audio_callback(AudioCallback::default());
5 changes: 2 additions & 3 deletions examples/devices.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
use cxx_juce::{
juce_audio_devices::{AudioDeviceManager, AudioIODeviceType},
Result, JUCE,
Result,
};

fn main() -> Result<()> {
let juce = JUCE::initialise();
let mut audio_device_manager = AudioDeviceManager::new(&juce);
let mut audio_device_manager = AudioDeviceManager::new();
audio_device_manager.initialise(2, 2)?;

let device_type = audio_device_manager.current_device_type().unwrap();
5 changes: 2 additions & 3 deletions examples/test_tone.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
use {
cxx_juce::{
juce_audio_devices::{AudioDeviceManager, AudioIODevice},
Result, JUCE,
Result,
},
std::{thread::sleep, time::Duration},
};

fn main() -> Result<()> {
let juce = JUCE::initialise();
let mut audio_device_manager = AudioDeviceManager::new(&juce);
let mut audio_device_manager = AudioDeviceManager::new();
audio_device_manager.initialise(0, 2)?;

{
Loading