mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-27 00:34:20 +01:00
Fixup audio device name writing in services
Games expect the output buffer the be entirely zero filled past the device name.
This commit is contained in:
parent
194cbe6c7c
commit
ae77bde171
@ -9,6 +9,7 @@ namespace skyline::service::audio {
|
|||||||
IAudioOutManager::IAudioOutManager(const DeviceState &state, ServiceManager &manager) : BaseService(state, manager) {}
|
IAudioOutManager::IAudioOutManager(const DeviceState &state, ServiceManager &manager) : BaseService(state, manager) {}
|
||||||
|
|
||||||
Result IAudioOutManager::ListAudioOuts(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
|
Result IAudioOutManager::ListAudioOuts(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
|
||||||
|
std::memset(request.outputBuf.at(0).data(), 0, request.outputBuf.at(0).size());
|
||||||
request.outputBuf.at(0).copy_from(constant::DefaultAudioOutName);
|
request.outputBuf.at(0).copy_from(constant::DefaultAudioOutName);
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
@ -30,6 +31,8 @@ namespace skyline::service::audio {
|
|||||||
response.Push(static_cast<u32>(skyline::audio::AudioFormat::Int16));
|
response.Push(static_cast<u32>(skyline::audio::AudioFormat::Int16));
|
||||||
response.Push(static_cast<u32>(skyline::audio::AudioOutState::Stopped));
|
response.Push(static_cast<u32>(skyline::audio::AudioOutState::Stopped));
|
||||||
|
|
||||||
|
std::memset(request.outputBuf.at(0).data(), 0, request.outputBuf.at(0).size());
|
||||||
|
|
||||||
if (request.inputBuf.at(0).empty() || !request.inputBuf.at(0)[0])
|
if (request.inputBuf.at(0).empty() || !request.inputBuf.at(0)[0])
|
||||||
request.outputBuf.at(0).copy_from(constant::DefaultAudioOutName);
|
request.outputBuf.at(0).copy_from(constant::DefaultAudioOutName);
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user