Skip to content

Commit 672ce6e

Browse files
authored
Merge pull request #341 from GrayJack/update/audiorouting
refactor(audiorouting): Add the missing functions on the header
2 parents 794c9a9 + 214fa8c commit 672ce6e

File tree

4 files changed

+52
-5
lines changed

4 files changed

+52
-5
lines changed

src/kernel/Makefile.am

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,7 @@ libpspkernelinclude_HEADERS = \
7373
pspsysclib.h \
7474
pspimpose_driver.h \
7575
pspinit.h \
76-
pspamctrl.h \
77-
pspaudiorouting.h
76+
pspamctrl.h
7877

7978
lib_LIBRARIES = libpspkernel.a
8079

src/user/Makefile.am

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,11 @@ LOADEXEC_OBJS = LoadExecForUser_0000.o LoadExecForUser_0001.o LoadExecForUser_00
3232

3333
IMPOSE_OBJS = sceImpose_0000.o sceImpose_0001.o sceImpose_0002.o sceImpose_0003.o sceImpose_0004.o sceImpose_0005.o sceImpose_0006.o sceImpose_0007.o sceImpose_0008.o sceImpose_0009.o sceImpose_0010.o sceImpose_0011.o sceImpose_0012.o sceImpose_0013.o sceImpose_0014.o sceImpose_0015.o
3434

35+
AUDIOROUTING_OBJS = sceAudioRouting_0000.o sceAudioRouting_0001.o sceAudioRouting_0002.o sceAudioRouting_0003.o
36+
3537
libpspuserincludedir = @PSPSDK_INCLUDEDIR@
3638
libpspuserinclude_HEADERS = \
39+
pspaudiorouting.h \
3740
pspiofilemgr.h \
3841
pspiofilemgr_devctl.h \
3942
pspiofilemgr_dirent.h \
@@ -81,7 +84,8 @@ $(THREADMAN_OBJS) \
8184
$(UTILS_OBJS) \
8285
$(INTERRUPT_OBJS) \
8386
$(LOADEXEC_OBJS) \
84-
$(IMPOSE_OBJS)
87+
$(IMPOSE_OBJS) \
88+
$(AUDIOROUTING_OBJS)
8589

8690
$(IO_OBJS): IoFileMgrForUser.S
8791
$(AM_V_CPPAS)$(CPPASCOMPILE) -DF_$* $< -c -o $@
@@ -115,3 +119,6 @@ $(LOADEXEC_OBJS): LoadExecForUser.S
115119

116120
$(IMPOSE_OBJS): sceImpose.S
117121
$(AM_V_CPPAS)$(CPPASCOMPILE) -DF_$* $< -c -o $@
122+
123+
$(AUDIOROUTING_OBJS): sceAudioRouting.S
124+
$(AM_V_CPPAS)$(CPPASCOMPILE) -DF_$* $< -c -o $@
Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
#ifndef __PSPAUDIOROUTING_H__
1212
#define __PSPAUDIOROUTING_H__
1313

14+
#ifdef __cplusplus
15+
extern "C" {
16+
#endif /* __cplusplus */
17+
1418
/**
1519
* Set routing mode.
1620
*
@@ -25,7 +29,25 @@ int sceAudioRoutingSetMode( int mode );
2529
*
2630
* @return the current routing mode.
2731
*/
28-
int sceAudioRoutingGetMode();
32+
int sceAudioRoutingGetMode(void);
33+
34+
/** Get the current routing volume mode.
35+
*
36+
* @return The current routing volume mode.
37+
*/
38+
int sceAudioRoutingGetVolumeMode(void);
39+
40+
/** Set the routing volume mode.
41+
*
42+
* @param vol_mode The routing volume to set (`0` or `1`).
43+
*
44+
* @return `0` on success, `< 0` on error.
45+
*/
46+
int sceAudioRoutingSetVolumeMode(int vol_mode);
47+
48+
#ifdef __cplusplus
49+
}
50+
#endif /* __cplusplus */
2951

30-
#endif
52+
#endif /* __PSPAUDIOROUTING_H__ */
3153

src/user/sceAudioRouting.S

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
.set noreorder
2+
3+
#include "pspimport.s"
4+
5+
#ifdef F_sceAudioRouting_0000
6+
IMPORT_START "sceAudioRouting",0x40010000
7+
#endif
8+
#ifdef F_sceAudioRouting_0001
9+
IMPORT_FUNC "sceAudioRouting",0x28235C56,sceAudioRoutingGetVolumeMode
10+
#endif
11+
#ifdef F_sceAudioRouting_0002
12+
IMPORT_FUNC "sceAudioRouting",0x36FD8AA9,sceAudioRoutingSetMode
13+
#endif
14+
#ifdef F_sceAudioRouting_0003
15+
IMPORT_FUNC "sceAudioRouting",0x39240E7D,sceAudioRoutingGetMode
16+
#endif
17+
#ifdef F_sceAudioRouting_0004
18+
IMPORT_FUNC "sceAudioRouting",0xBB548475,sceAudioRoutingSetVolumeMode
19+
#endif

0 commit comments

Comments
 (0)