mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-16 07:50:28 +02:00
Some renaming and cleanup in the Android audio code
This commit is contained in:
1 parent
b6f6e954a3
commit
aebbff55f1
10 files changed
+84
-77
No files matched your search
@@ -0,0 +1,26 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
typedef int (*AndroidAudioCallback)(short *buffer, int num_samples);
|
||||
|
||||
class AudioContext {
|
||||
public:
|
||||
AudioContext(AndroidAudioCallback cb, int _FramesPerBuffer, int _SampleRate);
|
||||
virtual bool Init() { return false; }
|
||||
virtual ~AudioContext() {}
|
||||
|
||||
protected:
|
||||
AndroidAudioCallback audioCallback;
|
||||
|
||||
int framesPerBuffer;
|
||||
int sampleRate;
|
||||
};
|
||||
|
||||
struct AndroidAudioState;
|
||||
|
||||
// It's okay for optimalFramesPerBuffer and optimalSampleRate to be 0. Defaults will be used.
|
||||
AndroidAudioState *AndroidAudio_Init(AndroidAudioCallback cb, int optimalFramesPerBuffer, int optimalSampleRate);
|
||||
bool AndroidAudio_Pause(AndroidAudioState *state);
|
||||
bool AndroidAudio_Resume(AndroidAudioState *state);
|
||||
bool AndroidAudio_Shutdown(AndroidAudioState *state);
|
||||
Reference in new issue
Block a user