mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-21 12:32:40 +02:00
audctl: fix TargetVolume functions
This commit is contained in:
parent
7caf74af76
commit
7b9eb469c9
@ -41,10 +41,10 @@ Result audctlInitialize(void);
|
|||||||
void audctlExit(void);
|
void audctlExit(void);
|
||||||
Service* audctlGetServiceSession(void);
|
Service* audctlGetServiceSession(void);
|
||||||
|
|
||||||
Result audctlGetTargetVolume(float* volume_out, AudioTarget target);
|
Result audctlGetTargetVolume(s32* volume_out, AudioTarget target);
|
||||||
Result audctlSetTargetVolume(AudioTarget target, float volume);
|
Result audctlSetTargetVolume(AudioTarget target, s32 volume);
|
||||||
Result audctlGetTargetVolumeMin(float* volume_out);
|
Result audctlGetTargetVolumeMin(s32* volume_out);
|
||||||
Result audctlGetTargetVolumeMax(float* volume_out);
|
Result audctlGetTargetVolumeMax(s32* volume_out);
|
||||||
Result audctlIsTargetMute(bool* mute_out, AudioTarget target);
|
Result audctlIsTargetMute(bool* mute_out, AudioTarget target);
|
||||||
Result audctlSetTargetMute(AudioTarget target, bool mute);
|
Result audctlSetTargetMute(AudioTarget target, bool mute);
|
||||||
Result audctlIsTargetConnected(bool* connected_out, AudioTarget target);
|
Result audctlIsTargetConnected(bool* connected_out, AudioTarget target);
|
||||||
|
@ -20,13 +20,13 @@ Service* audctlGetServiceSession(void) {
|
|||||||
return &g_audctlSrv;
|
return &g_audctlSrv;
|
||||||
}
|
}
|
||||||
|
|
||||||
Result audctlGetTargetVolume(float* volume_out, AudioTarget target) {
|
Result audctlGetTargetVolume(s32* volume_out, AudioTarget target) {
|
||||||
const struct {
|
const struct {
|
||||||
u32 target;
|
u32 target;
|
||||||
} in = { target };
|
} in = { target };
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
float volume;
|
s32 volume;
|
||||||
} out;
|
} out;
|
||||||
|
|
||||||
Result rc = serviceDispatchInOut(&g_audctlSrv, 0, in, out);
|
Result rc = serviceDispatchInOut(&g_audctlSrv, 0, in, out);
|
||||||
@ -37,18 +37,18 @@ Result audctlGetTargetVolume(float* volume_out, AudioTarget target) {
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
Result audctlSetTargetVolume(AudioTarget target, float volume) {
|
Result audctlSetTargetVolume(AudioTarget target, s32 volume) {
|
||||||
const struct {
|
const struct {
|
||||||
u32 target;
|
u32 target;
|
||||||
float volume;
|
s32 volume;
|
||||||
} in = { target, volume };
|
} in = { target, volume };
|
||||||
|
|
||||||
return serviceDispatchIn(&g_audctlSrv, 1, in);
|
return serviceDispatchIn(&g_audctlSrv, 1, in);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result audctlGetTargetVolumeMin(float* volume_out) {
|
Result audctlGetTargetVolumeMin(s32* volume_out) {
|
||||||
struct {
|
struct {
|
||||||
float volume;
|
s32 volume;
|
||||||
} out;
|
} out;
|
||||||
|
|
||||||
Result rc = serviceDispatchOut(&g_audctlSrv, 2, out);
|
Result rc = serviceDispatchOut(&g_audctlSrv, 2, out);
|
||||||
@ -59,9 +59,9 @@ Result audctlGetTargetVolumeMin(float* volume_out) {
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
Result audctlGetTargetVolumeMax(float* volume_out) {
|
Result audctlGetTargetVolumeMax(s32* volume_out) {
|
||||||
struct {
|
struct {
|
||||||
float volume;
|
s32 volume;
|
||||||
} out;
|
} out;
|
||||||
|
|
||||||
Result rc = serviceDispatchOut(&g_audctlSrv, 3, out);
|
Result rc = serviceDispatchOut(&g_audctlSrv, 3, out);
|
||||||
|
Loading…
Reference in New Issue
Block a user