Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(client_core): ✨ Move android to common CPAL code #2215

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Cargo.lock

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

1 change: 0 additions & 1 deletion alvr/client_core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ android_logger = "0.13"
ndk = { version = "0.9", features = ["api-level-26", "media"] }
ndk-context = "0.1"
ndk-sys = "0.6"
oboe = "0.6" # todo: remove once AudioThread shutdown crash is fixed

[target.'cfg(not(target_os = "android"))'.dependencies]
env_logger = "0.11"
Expand Down
219 changes: 0 additions & 219 deletions alvr/client_core/src/audio.rs

This file was deleted.

9 changes: 2 additions & 7 deletions alvr/client_core/src/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ use std::{
time::{Duration, Instant},
};

#[cfg(target_os = "android")]
use crate::audio;
#[cfg(not(target_os = "android"))]
use alvr_audio as audio;

const INITIAL_MESSAGE: &str = concat!(
"Searching for streamer...\n",
"Open ALVR on your PC then click \"Trust\"\n",
Expand Down Expand Up @@ -329,7 +324,7 @@ fn connection_pipeline(
let ctx = Arc::clone(&ctx);
move || {
while is_streaming(&ctx) {
alvr_common::show_err(audio::play_audio_loop(
alvr_common::show_err(alvr_audio::play_audio_loop(
|| is_streaming(&ctx),
&device,
2,
Expand All @@ -354,7 +349,7 @@ fn connection_pipeline(
move || {
while is_streaming(&ctx) {
let ctx = Arc::clone(&ctx);
match audio::record_audio_blocking(
match alvr_audio::record_audio_blocking(
Arc::new(move || is_streaming(&ctx)),
microphone_sender.clone(),
&device,
Expand Down
3 changes: 0 additions & 3 deletions alvr/client_core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ mod sockets;
mod statistics;
mod storage;

#[cfg(target_os = "android")]
mod audio;

pub mod graphics;

use alvr_common::{
Expand Down
Loading