• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2024 The ChromiumOS Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 //! Stub implementation of Android AAudio NDK
6 //!
7 //! This implementation is used to enable the virtio-snd for Android to be compiled without
8 //! Andoird AAudio NDK available. It is only used for testing purposes and not functional at
9 //! runtime.
10 
11 use std::os::raw::c_void;
12 
13 use crate::AAudioStream;
14 use crate::AAudioStreamBuilder;
15 use crate::AaudioFormatT;
16 use crate::AaudioResultT;
17 
18 #[no_mangle]
AAudio_createStreamBuilder(_builder: *mut *mut AAudioStreamBuilder) -> AaudioResultT19 extern "C" fn AAudio_createStreamBuilder(_builder: *mut *mut AAudioStreamBuilder) -> AaudioResultT {
20     unimplemented!();
21 }
22 
23 #[no_mangle]
AAudioStreamBuilder_delete(_builder: *mut AAudioStreamBuilder) -> AaudioResultT24 extern "C" fn AAudioStreamBuilder_delete(_builder: *mut AAudioStreamBuilder) -> AaudioResultT {
25     unimplemented!();
26 }
27 
28 #[no_mangle]
AAudioStreamBuilder_setBufferCapacityInFrames( _builder: *mut AAudioStreamBuilder, _num_frames: i32, )29 extern "C" fn AAudioStreamBuilder_setBufferCapacityInFrames(
30     _builder: *mut AAudioStreamBuilder,
31     _num_frames: i32,
32 ) {
33     unimplemented!();
34 }
35 
36 #[no_mangle]
AAudioStreamBuilder_setFormat( _builder: *mut AAudioStreamBuilder, _format: AaudioFormatT, )37 extern "C" fn AAudioStreamBuilder_setFormat(
38     _builder: *mut AAudioStreamBuilder,
39     _format: AaudioFormatT,
40 ) {
41     unimplemented!();
42 }
43 
44 #[no_mangle]
AAudioStreamBuilder_setSampleRate( _builder: *mut AAudioStreamBuilder, _sample_rate: i32, )45 extern "C" fn AAudioStreamBuilder_setSampleRate(
46     _builder: *mut AAudioStreamBuilder,
47     _sample_rate: i32,
48 ) {
49     unimplemented!();
50 }
51 
52 #[no_mangle]
AAudioStreamBuilder_setChannelCount( _builder: *mut AAudioStreamBuilder, _channel_count: i32, )53 extern "C" fn AAudioStreamBuilder_setChannelCount(
54     _builder: *mut AAudioStreamBuilder,
55     _channel_count: i32,
56 ) {
57     unimplemented!();
58 }
59 
60 #[no_mangle]
AAudioStreamBuilder_openStream( _builder: *mut AAudioStreamBuilder, _stream: *mut *mut AAudioStream, ) -> AaudioResultT61 extern "C" fn AAudioStreamBuilder_openStream(
62     _builder: *mut AAudioStreamBuilder,
63     _stream: *mut *mut AAudioStream,
64 ) -> AaudioResultT {
65     unimplemented!();
66 }
67 
68 #[no_mangle]
AAudioStream_requestStart(_stream: *mut AAudioStream) -> AaudioResultT69 extern "C" fn AAudioStream_requestStart(_stream: *mut AAudioStream) -> AaudioResultT {
70     unimplemented!();
71 }
72 
73 #[no_mangle]
AAudioStream_write( _stream: *mut AAudioStream, _buffer: *const c_void, _num_frames: i32, _timeout_nanoseconds: i64, )74 extern "C" fn AAudioStream_write(
75     _stream: *mut AAudioStream,
76     _buffer: *const c_void,
77     _num_frames: i32,
78     _timeout_nanoseconds: i64,
79 ) {
80     unimplemented!();
81 }
82 
83 #[no_mangle]
AAudioStream_close(_stream: *mut AAudioStream)84 extern "C" fn AAudioStream_close(_stream: *mut AAudioStream) {
85     unimplemented!();
86 }
87