refactor source tree organization, switch to meson

This commit is contained in:
Mis012
2022-10-02 23:06:56 +02:00
parent 2f785e2a59
commit 449090143e
296 changed files with 171615 additions and 69 deletions

View File

@@ -0,0 +1,10 @@
package android.media;
public class AudioManager {
public interface OnAudioFocusChangeListener {
}
public int getRingerMode() {
return 0;
}
}

View File

@@ -0,0 +1,78 @@
package android.media;
public class AudioTrack {
public interface OnPlaybackPositionUpdateListener {
void onMarkerReached(AudioTrack track);
void onPeriodicNotification(AudioTrack track);
}
int streamType;
int sampleRateInHz;
int channelConfig;
int audioFormat;
int bufferSizeInBytes;
int mode;
// for native code's use
long pcm_handle;
long params;
int channels;
int period_time;
// mostly
static int frames;
OnPlaybackPositionUpdateListener periodic_update_listener;
native void native_constructor(int streamType, int sampleRateInHz, int num_channels, int audioFormat, int bufferSizeInBytes, int mode);
public AudioTrack(int streamType, int sampleRateInHz, int channelConfig, int audioFormat, int bufferSizeInBytes, int mode) {
this.streamType = streamType;
this.sampleRateInHz = sampleRateInHz;
this.channelConfig = channelConfig;
this.audioFormat = audioFormat;
this.bufferSizeInBytes = bufferSizeInBytes;
this.mode = mode;
System.out.println("\n\n\nAudioTrack("+streamType+", "+sampleRateInHz+", "+channelConfig+", "+audioFormat+", "+bufferSizeInBytes+", "+mode+"); called\n\n\n\n");
int num_channels;
switch(channelConfig) {
case 2:
num_channels = 1;
break;
default:
num_channels = 1;
}
native_constructor(streamType, sampleRateInHz, num_channels, audioFormat, bufferSizeInBytes, mode);
}
public static native int getMinBufferSize (int sampleRateInHz, int channelConfig, int audioFormat);
public void setPlaybackPositionUpdateListener(OnPlaybackPositionUpdateListener listener) {
this.periodic_update_listener = listener;
}
public int setPositionNotificationPeriod(int periodInFrames) {
System.out.println("\n\n\nsetPositionNotificationPeriod("+periodInFrames+"); called\n\n\n\n");
return 0; // SUCCESS
}
public int getPositionNotificationPeriod() {
return this.frames;
}
public native void play();
public void stop() {
System.out.println("calling stop(), how did this not get reported before DIDREEEEEEEEEEEEEEEEEEEEEEEEE\n");
}
public void flush() {
System.out.println("calling flush(), how did this not get reported before DIDREEEEEEEEEEEEEEEEEEEEEEEEE\n");
}
public void release() {
System.out.println("calling release(), how did this not get reported before DIDREEEEEEEEEEEEEEEEEEEEEEEEE\n");
}
public native int write (byte[] audioData, int offsetInBytes, int sizeInBytes);
}

View File

@@ -0,0 +1,20 @@
package android.media;
public class MediaPlayer {
public interface OnCompletionListener {
}
public interface OnErrorListener {
}
public interface OnPreparedListener {
}
public interface OnBufferingUpdateListener {
}
public interface OnInfoListener {
}
public interface OnSeekCompleteListener {
}
public interface OnVideoSizeChangedListener {
}
public interface MediaPlayerControl {
}
}

View File

@@ -0,0 +1,12 @@
package android.media;
import android.content.res.AssetFileDescriptor;
public class SoundPool {
public SoundPool (int maxStreams, int streamType, int srcQuality) {
}
public int load(AssetFileDescriptor afd, int priority) {
return 0;
}
}