Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Suyu
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
many-archive
Suyu
Commits
6f27edcc
There was an error fetching the commit references. Please try again later.
Commit
6f27edcc
authored
7 years ago
by
bunnei
Browse files
Options
Downloads
Patches
Plain Diff
audren_u: Fix GetAudioDevice.
parent
bde3e667
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/core/hle/service/audio/audren_u.cpp
+47
-6
47 additions, 6 deletions
src/core/hle/service/audio/audren_u.cpp
src/core/hle/service/audio/audren_u.h
+1
-1
1 addition, 1 deletion
src/core/hle/service/audio/audren_u.h
with
48 additions
and
7 deletions
src/core/hle/service/audio/audren_u.cpp
+
47
−
6
View file @
6f27edcc
...
...
@@ -151,12 +151,52 @@ private:
Kernel
::
SharedPtr
<
Kernel
::
Event
>
system_event
;
};
class
IAudioDevice
final
:
public
ServiceFramework
<
IAudioDevice
>
{
public:
IAudioDevice
()
:
ServiceFramework
(
"IAudioDevice"
)
{
static
const
FunctionInfo
functions
[]
=
{
{
0x0
,
&
IAudioDevice
::
ListAudioDeviceName
,
"ListAudioDeviceName"
},
{
0x1
,
&
IAudioDevice
::
SetAudioDeviceOutputVolume
,
"SetAudioDeviceOutputVolume"
}};
RegisterHandlers
(
functions
);
buffer_event
=
Kernel
::
Event
::
Create
(
Kernel
::
ResetType
::
OneShot
,
"IAudioOutBufferReleasedEvent"
);
}
private
:
void
ListAudioDeviceName
(
Kernel
::
HLERequestContext
&
ctx
)
{
LOG_WARNING
(
Service_Audio
,
"(STUBBED) called"
);
IPC
::
RequestParser
rp
{
ctx
};
const
std
::
string
audio_interface
=
"AudioInterface"
;
ctx
.
WriteBuffer
(
audio_interface
.
c_str
(),
audio_interface
.
size
());
IPC
::
ResponseBuilder
rb
=
rp
.
MakeBuilder
(
3
,
0
,
0
);
rb
.
Push
(
RESULT_SUCCESS
);
rb
.
Push
<
u32
>
(
1
);
}
void
SetAudioDeviceOutputVolume
(
Kernel
::
HLERequestContext
&
ctx
)
{
LOG_WARNING
(
Service_Audio
,
"(STUBBED) called"
);
IPC
::
RequestParser
rp
{
ctx
};
f32
volume
=
static_cast
<
f32
>
(
rp
.
Pop
<
u32
>
());
auto
file_buffer
=
ctx
.
ReadBuffer
();
auto
end
=
std
::
find
(
file_buffer
.
begin
(),
file_buffer
.
end
(),
'\0'
);
IPC
::
ResponseBuilder
rb
=
rp
.
MakeBuilder
(
2
,
0
,
0
);
rb
.
Push
(
RESULT_SUCCESS
);
}
Kernel
::
SharedPtr
<
Kernel
::
Event
>
buffer_event
;
};
AudRenU
::
AudRenU
()
:
ServiceFramework
(
"audren:u"
)
{
static
const
FunctionInfo
functions
[]
=
{
{
0
,
&
AudRenU
::
OpenAudioRenderer
,
"OpenAudioRenderer"
},
{
1
,
&
AudRenU
::
GetAudioRendererWorkBufferSize
,
"GetAudioRendererWorkBufferSize"
},
{
2
,
&
AudRenU
::
GetAudioRenderersProcessMasterVolume
,
"GetAudioRenderersProcessMasterVolume"
},
{
3
,
nullptr
,
"SetAudioRenderersProcessMasterVolume"
},
{
2
,
&
AudRenU
::
GetAudioDevice
,
"GetAudioDevice"
},
};
RegisterHandlers
(
functions
);
}
...
...
@@ -179,12 +219,13 @@ void AudRenU::GetAudioRendererWorkBufferSize(Kernel::HLERequestContext& ctx) {
LOG_WARNING
(
Service_Audio
,
"(STUBBED) called"
);
}
void
AudRenU
::
GetAudio
RenderersProcessMasterVolum
e
(
Kernel
::
HLERequestContext
&
ctx
)
{
IPC
::
ResponseBuilder
rb
{
ctx
,
3
};
void
AudRenU
::
GetAudio
Devic
e
(
Kernel
::
HLERequestContext
&
ctx
)
{
IPC
::
ResponseBuilder
rb
{
ctx
,
2
,
0
,
1
};
rb
.
Push
(
RESULT_SUCCESS
);
rb
.
Push
<
u32
>
(
100
);
LOG_WARNING
(
Service_Audio
,
"(STUBBED) called"
);
rb
.
PushIpcInterface
<
Audio
::
IAudioDevice
>
();
LOG_DEBUG
(
Service_Audio
,
"called"
);
}
}
// namespace Audio
...
...
This diff is collapsed.
Click to expand it.
src/core/hle/service/audio/audren_u.h
+
1
−
1
View file @
6f27edcc
...
...
@@ -21,7 +21,7 @@ public:
private:
void
OpenAudioRenderer
(
Kernel
::
HLERequestContext
&
ctx
);
void
GetAudioRendererWorkBufferSize
(
Kernel
::
HLERequestContext
&
ctx
);
void
GetAudio
RenderersProcessMasterVolum
e
(
Kernel
::
HLERequestContext
&
ctx
);
void
GetAudio
Devic
e
(
Kernel
::
HLERequestContext
&
ctx
);
};
}
// namespace Audio
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment