mirror of
https://github.com/pspdev/pspsdk.git
synced 2025-12-24 04:32:36 +00:00
Add getters in pspaudiolib
This commit is contained in:
@@ -30,6 +30,12 @@ void pspAudioSetVolume(int channel, int left, int right)
|
||||
AudioStatus[channel].volumeleft = left;
|
||||
}
|
||||
|
||||
void pspAudioGetVolume(int channel, int *left, int *right)
|
||||
{
|
||||
*right = AudioStatus[channel].volumeright;
|
||||
*left = AudioStatus[channel].volumeleft;
|
||||
}
|
||||
|
||||
void pspAudioSetChannelCallback(int channel, pspAudioCallback_t callback, void *pdata)
|
||||
{
|
||||
volatile psp_audio_channelinfo *pci = &AudioStatus[channel];
|
||||
@@ -38,6 +44,13 @@ void pspAudioSetChannelCallback(int channel, pspAudioCallback_t callback, void *
|
||||
pci->callback=callback;
|
||||
}
|
||||
|
||||
void pspAudioGetChannelCallback(int channel, pspAudioCallback_t *callback, void **pdata)
|
||||
{
|
||||
volatile psp_audio_channelinfo *pci = &AudioStatus[channel];
|
||||
*pdata = pci->pdata;
|
||||
*callback = pci->callback;
|
||||
}
|
||||
|
||||
int pspAudioOutBlocking(unsigned int channel, unsigned int vol1, unsigned int vol2, void *buf)
|
||||
{
|
||||
if (!audio_ready) return -1;
|
||||
|
||||
@@ -41,7 +41,9 @@ void pspAudioEndPre();
|
||||
void pspAudioEnd();
|
||||
|
||||
void pspAudioSetVolume(int channel, int left, int right);
|
||||
void pspAudioGetVolume(int channel, int *left, int *right);
|
||||
void pspAudioSetChannelCallback(int channel, pspAudioCallback_t callback, void *pdata);
|
||||
void pspAudioGetChannelCallback(int channel, pspAudioCallback_t *callback, void **pdata);
|
||||
int pspAudioOutBlocking(unsigned int channel, unsigned int vol1, unsigned int vol2, void *buf);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
Reference in New Issue
Block a user